* [PATCH] i2c: busses: Replace spin_lock_irqsave with spin_lock in hard IRQ
@ 2021-02-08 10:48 Weihang Li
2021-02-12 7:42 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Weihang Li @ 2021-02-08 10:48 UTC (permalink / raw)
To: wsa, linux-i2c, linux-arm-kernel, linux-mips
Cc: linuxarm, Weihang Li, Baruch Siach, Paul Cercueil
There is no need to do irqsave and irqrestore in context of hard IRQ.
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
drivers/i2c/busses/i2c-digicolor.c | 5 ++---
drivers/i2c/busses/i2c-jz4780.c | 5 ++---
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-digicolor.c b/drivers/i2c/busses/i2c-digicolor.c
index f67639d..60c838c 100644
--- a/drivers/i2c/busses/i2c-digicolor.c
+++ b/drivers/i2c/busses/i2c-digicolor.c
@@ -160,12 +160,11 @@ static irqreturn_t dc_i2c_irq(int irq, void *dev_id)
{
struct dc_i2c *i2c = dev_id;
int cmd_status = dc_i2c_cmd_status(i2c);
- unsigned long flags;
u8 addr_cmd;
writeb_relaxed(1, i2c->regs + II_INTFLAG_CLEAR);
- spin_lock_irqsave(&i2c->lock, flags);
+ spin_lock(&i2c->lock);
if (cmd_status == II_CMD_STATUS_ACK_BAD
|| cmd_status == II_CMD_STATUS_ABORT) {
@@ -207,7 +206,7 @@ static irqreturn_t dc_i2c_irq(int irq, void *dev_id)
}
out:
- spin_unlock_irqrestore(&i2c->lock, flags);
+ spin_unlock(&i2c->lock);
return IRQ_HANDLED;
}
diff --git a/drivers/i2c/busses/i2c-jz4780.c b/drivers/i2c/busses/i2c-jz4780.c
index cb4a25e..8509c5f 100644
--- a/drivers/i2c/busses/i2c-jz4780.c
+++ b/drivers/i2c/busses/i2c-jz4780.c
@@ -437,9 +437,8 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev_id)
unsigned short intst;
unsigned short intmsk;
struct jz4780_i2c *i2c = dev_id;
- unsigned long flags;
- spin_lock_irqsave(&i2c->lock, flags);
+ spin_lock(&i2c->lock);
intmsk = jz4780_i2c_readw(i2c, JZ4780_I2C_INTM);
intst = jz4780_i2c_readw(i2c, JZ4780_I2C_INTST);
@@ -551,7 +550,7 @@ static irqreturn_t jz4780_i2c_irq(int irqno, void *dev_id)
}
done:
- spin_unlock_irqrestore(&i2c->lock, flags);
+ spin_unlock(&i2c->lock);
return IRQ_HANDLED;
}
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: busses: Replace spin_lock_irqsave with spin_lock in hard IRQ
2021-02-08 10:48 [PATCH] i2c: busses: Replace spin_lock_irqsave with spin_lock in hard IRQ Weihang Li
@ 2021-02-12 7:42 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2021-02-12 7:42 UTC (permalink / raw)
To: Weihang Li
Cc: linux-i2c, linux-arm-kernel, linux-mips, linuxarm, Baruch Siach,
Paul Cercueil
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
On Mon, Feb 08, 2021 at 06:48:37PM +0800, Weihang Li wrote:
> There is no need to do irqsave and irqrestore in context of hard IRQ.
>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-12 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 10:48 [PATCH] i2c: busses: Replace spin_lock_irqsave with spin_lock in hard IRQ Weihang Li
2021-02-12 7:42 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).