* [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ
@ 2021-02-07 11:12 ` Tian Tao
0 siblings, 0 replies; 6+ messages in thread
From: Tian Tao @ 2021-02-07 11:12 UTC (permalink / raw)
To: jdelvare, linux, thierry.reding, lee.jones
Cc: openbmc, linux-hwmon, linux-pwm
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
index 11a2860..6c27af1 100644
--- a/drivers/hwmon/npcm750-pwm-fan.c
+++ b/drivers/hwmon/npcm750-pwm-fan.c
@@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
{
struct npcm7xx_pwm_fan_data *data = dev_id;
- unsigned long flags;
int module;
u8 flag;
module = irq - data->fan_irq[0];
- spin_lock_irqsave(&data->fan_lock[module], flags);
+ spin_lock(&data->fan_lock[module]);
flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
if (flag > 0) {
@@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
return IRQ_HANDLED;
}
- spin_unlock_irqrestore(&data->fan_lock[module], flags);
+ spin_unlock(&data->fan_lock[module]);
return IRQ_NONE;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ
@ 2021-02-07 11:12 ` Tian Tao
0 siblings, 0 replies; 6+ messages in thread
From: Tian Tao @ 2021-02-07 11:12 UTC (permalink / raw)
To: jdelvare, linux, thierry.reding, lee.jones
Cc: linux-hwmon, linux-pwm, openbmc
The code has been in a irq-disabled context since it is hard IRQ. There
is no necessity to do it again.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
index 11a2860..6c27af1 100644
--- a/drivers/hwmon/npcm750-pwm-fan.c
+++ b/drivers/hwmon/npcm750-pwm-fan.c
@@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
{
struct npcm7xx_pwm_fan_data *data = dev_id;
- unsigned long flags;
int module;
u8 flag;
module = irq - data->fan_irq[0];
- spin_lock_irqsave(&data->fan_lock[module], flags);
+ spin_lock(&data->fan_lock[module]);
flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
if (flag > 0) {
@@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
return IRQ_HANDLED;
}
- spin_unlock_irqrestore(&data->fan_lock[module], flags);
+ spin_unlock(&data->fan_lock[module]);
return IRQ_NONE;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ
2021-02-07 11:12 ` Tian Tao
@ 2021-02-12 4:30 ` Guenter Roeck
-1 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-02-12 4:30 UTC (permalink / raw)
To: Tian Tao
Cc: jdelvare, thierry.reding, lee.jones, openbmc, linux-hwmon, linux-pwm
On Sun, Feb 07, 2021 at 07:12:13PM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
> index 11a2860..6c27af1 100644
> --- a/drivers/hwmon/npcm750-pwm-fan.c
> +++ b/drivers/hwmon/npcm750-pwm-fan.c
> @@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
> static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> {
> struct npcm7xx_pwm_fan_data *data = dev_id;
> - unsigned long flags;
> int module;
> u8 flag;
>
> module = irq - data->fan_irq[0];
> - spin_lock_irqsave(&data->fan_lock[module], flags);
> + spin_lock(&data->fan_lock[module]);
>
> flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
> if (flag > 0) {
> @@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> - spin_unlock_irqrestore(&data->fan_lock[module], flags);
> + spin_unlock(&data->fan_lock[module]);
>
> return IRQ_NONE;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ
@ 2021-02-12 4:30 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-02-12 4:30 UTC (permalink / raw)
To: Tian Tao
Cc: linux-hwmon, linux-pwm, jdelvare, openbmc, thierry.reding, lee.jones
On Sun, Feb 07, 2021 at 07:12:13PM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
> index 11a2860..6c27af1 100644
> --- a/drivers/hwmon/npcm750-pwm-fan.c
> +++ b/drivers/hwmon/npcm750-pwm-fan.c
> @@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
> static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> {
> struct npcm7xx_pwm_fan_data *data = dev_id;
> - unsigned long flags;
> int module;
> u8 flag;
>
> module = irq - data->fan_irq[0];
> - spin_lock_irqsave(&data->fan_lock[module], flags);
> + spin_lock(&data->fan_lock[module]);
>
> flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
> if (flag > 0) {
> @@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> - spin_unlock_irqrestore(&data->fan_lock[module], flags);
> + spin_unlock(&data->fan_lock[module]);
>
> return IRQ_NONE;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ
2021-02-07 11:12 ` Tian Tao
@ 2021-02-12 15:04 ` Guenter Roeck
-1 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-02-12 15:04 UTC (permalink / raw)
To: Tian Tao
Cc: jdelvare, thierry.reding, lee.jones, openbmc, linux-hwmon, linux-pwm
On Sun, Feb 07, 2021 at 07:12:13PM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Now dropped. Quite obviously you have not even compile tested,
much less runtime tested this patch.
Guenter
> ---
> drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
> index 11a2860..6c27af1 100644
> --- a/drivers/hwmon/npcm750-pwm-fan.c
> +++ b/drivers/hwmon/npcm750-pwm-fan.c
> @@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
> static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> {
> struct npcm7xx_pwm_fan_data *data = dev_id;
> - unsigned long flags;
> int module;
> u8 flag;
>
> module = irq - data->fan_irq[0];
> - spin_lock_irqsave(&data->fan_lock[module], flags);
> + spin_lock(&data->fan_lock[module]);
>
> flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
> if (flag > 0) {
> @@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> - spin_unlock_irqrestore(&data->fan_lock[module], flags);
> + spin_unlock(&data->fan_lock[module]);
>
> return IRQ_NONE;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ
@ 2021-02-12 15:04 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2021-02-12 15:04 UTC (permalink / raw)
To: Tian Tao
Cc: linux-hwmon, linux-pwm, jdelvare, openbmc, thierry.reding, lee.jones
On Sun, Feb 07, 2021 at 07:12:13PM +0800, Tian Tao wrote:
> The code has been in a irq-disabled context since it is hard IRQ. There
> is no necessity to do it again.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Now dropped. Quite obviously you have not even compile tested,
much less runtime tested this patch.
Guenter
> ---
> drivers/hwmon/npcm750-pwm-fan.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
> index 11a2860..6c27af1 100644
> --- a/drivers/hwmon/npcm750-pwm-fan.c
> +++ b/drivers/hwmon/npcm750-pwm-fan.c
> @@ -481,12 +481,11 @@ static inline void npcm7xx_check_cmp(struct npcm7xx_pwm_fan_data *data,
> static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> {
> struct npcm7xx_pwm_fan_data *data = dev_id;
> - unsigned long flags;
> int module;
> u8 flag;
>
> module = irq - data->fan_irq[0];
> - spin_lock_irqsave(&data->fan_lock[module], flags);
> + spin_lock(&data->fan_lock[module]);
>
> flag = ioread8(NPCM7XX_FAN_REG_TICTRL(data->fan_base, module));
> if (flag > 0) {
> @@ -496,7 +495,7 @@ static irqreturn_t npcm7xx_fan_isr(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> - spin_unlock_irqrestore(&data->fan_lock[module], flags);
> + spin_unlock(&data->fan_lock[module]);
>
> return IRQ_NONE;
> }
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-02-12 15:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-07 11:12 [PATCH] hwmon: (npcm750-pwm-fan): replace spin_lock_irqsave by spin_lock in hard IRQ Tian Tao
2021-02-07 11:12 ` Tian Tao
2021-02-12 4:30 ` Guenter Roeck
2021-02-12 4:30 ` Guenter Roeck
2021-02-12 15:04 ` Guenter Roeck
2021-02-12 15:04 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.