Commit 36493269 authored by Barry Song's avatar Barry Song Committed by David S. Miller

net: allwinner: remove redundant irqsave and irqrestore in hardIRQ

The comment "holders of db->lock must always block IRQs" and related
code to do irqsave and irqrestore don't make sense since we are in a
IRQ-disabled hardIRQ context.

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarBarry Song <song.bao.hua@hisilicon.com>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4b91468
...@@ -640,13 +640,11 @@ static irqreturn_t emac_interrupt(int irq, void *dev_id) ...@@ -640,13 +640,11 @@ static irqreturn_t emac_interrupt(int irq, void *dev_id)
struct net_device *dev = dev_id; struct net_device *dev = dev_id;
struct emac_board_info *db = netdev_priv(dev); struct emac_board_info *db = netdev_priv(dev);
int int_status; int int_status;
unsigned long flags;
unsigned int reg_val; unsigned int reg_val;
/* A real interrupt coming */ /* A real interrupt coming */
/* holders of db->lock must always block IRQs */ spin_lock(&db->lock);
spin_lock_irqsave(&db->lock, flags);
/* Disable all interrupts */ /* Disable all interrupts */
writel(0, db->membase + EMAC_INT_CTL_REG); writel(0, db->membase + EMAC_INT_CTL_REG);
...@@ -680,7 +678,7 @@ static irqreturn_t emac_interrupt(int irq, void *dev_id) ...@@ -680,7 +678,7 @@ static irqreturn_t emac_interrupt(int irq, void *dev_id)
reg_val |= (0xf << 0) | (0x01 << 8); reg_val |= (0xf << 0) | (0x01 << 8);
writel(reg_val, db->membase + EMAC_INT_CTL_REG); writel(reg_val, db->membase + EMAC_INT_CTL_REG);
} }
spin_unlock_irqrestore(&db->lock, flags); spin_unlock(&db->lock);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment