linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] extcon: max77693: Add extra IRQF_ONESHOT
@ 2019-07-25  6:36 Vasyl Gomonovych
  2019-07-25  7:23 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Vasyl Gomonovych @ 2019-07-25  6:36 UTC (permalink / raw)
  To: cw00.choi, krzk, b.zolnierkie, myungjoo.ham
  Cc: Vasyl Gomonovych, linux-kernel

Do not fire irq again until thread done
This issue was found by code inspection
Coccicheck irqf_oneshot.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
 drivers/extcon/extcon-max77693.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 32fc5a66ffa9..68e42cd87e98 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -1142,7 +1142,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
 
 		ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
 				max77693_muic_irq_handler,
-				IRQF_NO_SUSPEND,
+				IRQF_NO_SUSPEND | IRQF_ONESHOT,
 				muic_irq->name, info);
 		if (ret) {
 			dev_err(&pdev->dev,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] extcon: max77693: Add extra IRQF_ONESHOT
  2019-07-25  6:36 [PATCH] extcon: max77693: Add extra IRQF_ONESHOT Vasyl Gomonovych
@ 2019-07-25  7:23 ` Krzysztof Kozlowski
  2019-07-26  8:37   ` Gomonovych, Vasyl
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2019-07-25  7:23 UTC (permalink / raw)
  To: Vasyl Gomonovych
  Cc: Chanwoo Choi, Bartłomiej Żołnierkiewicz,
	myungjoo.ham, linux-kernel

On Thu, 25 Jul 2019 at 08:37, Vasyl Gomonovych <gomonovych@gmail.com> wrote:
>
> Do not fire irq again until thread done
> This issue was found by code inspection
> Coccicheck irqf_oneshot.cocci

Rationale does not look convincing. Do you fix real problem or just
automatic fix from coccinelle? If the latter, then it looks wrong.
This is virtual IRQ so no need for oneshot. The hardware IRQ has
oneshot set. Otherwise please provide slightly more specific rationale
for this commit.

Best regards,
Krzysztof


>
> Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
> ---
>  drivers/extcon/extcon-max77693.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index 32fc5a66ffa9..68e42cd87e98 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -1142,7 +1142,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
>
>                 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
>                                 max77693_muic_irq_handler,
> -                               IRQF_NO_SUSPEND,
> +                               IRQF_NO_SUSPEND | IRQF_ONESHOT,
>                                 muic_irq->name, info);
>                 if (ret) {
>                         dev_err(&pdev->dev,
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] extcon: max77693: Add extra IRQF_ONESHOT
  2019-07-25  7:23 ` Krzysztof Kozlowski
@ 2019-07-26  8:37   ` Gomonovych, Vasyl
  0 siblings, 0 replies; 3+ messages in thread
From: Gomonovych, Vasyl @ 2019-07-26  8:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Chanwoo Choi, Bartłomiej Żołnierkiewicz,
	myungjoo.ham, linux-kernel

Sorry, my bad, I have missed disabling place, and positive feedback
for max in other thread and push me to send it.

On Thu, Jul 25, 2019 at 9:23 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, 25 Jul 2019 at 08:37, Vasyl Gomonovych <gomonovych@gmail.com> wrote:
> >
> > Do not fire irq again until thread done
> > This issue was found by code inspection
> > Coccicheck irqf_oneshot.cocci
>
> Rationale does not look convincing. Do you fix real problem or just
> automatic fix from coccinelle? If the latter, then it looks wrong.
> This is virtual IRQ so no need for oneshot. The hardware IRQ has
> oneshot set. Otherwise please provide slightly more specific rationale
> for this commit.
>
> Best regards,
> Krzysztof
>
>
> >
> > Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
> > ---
> >  drivers/extcon/extcon-max77693.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> > index 32fc5a66ffa9..68e42cd87e98 100644
> > --- a/drivers/extcon/extcon-max77693.c
> > +++ b/drivers/extcon/extcon-max77693.c
> > @@ -1142,7 +1142,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
> >
> >                 ret = devm_request_threaded_irq(&pdev->dev, virq, NULL,
> >                                 max77693_muic_irq_handler,
> > -                               IRQF_NO_SUSPEND,
> > +                               IRQF_NO_SUSPEND | IRQF_ONESHOT,
> >                                 muic_irq->name, info);
> >                 if (ret) {
> >                         dev_err(&pdev->dev,
> > --
> > 2.17.1
> >



-- 
Доброї вам пори дня.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-26  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  6:36 [PATCH] extcon: max77693: Add extra IRQF_ONESHOT Vasyl Gomonovych
2019-07-25  7:23 ` Krzysztof Kozlowski
2019-07-26  8:37   ` Gomonovych, Vasyl

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).