linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: goodix - Fix missing IRQF_ONESHOT as only threaded handler
@ 2021-04-16  3:17 zhuguangqing83
  2021-04-16  8:47 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: zhuguangqing83 @ 2021-04-16  3:17 UTC (permalink / raw)
  To: Bastien Nocera, Dmitry Torokhov, Henrik Rydberg
  Cc: linux-input, linux-kernel, Guangqing Zhu

From: Guangqing Zhu <zhuguangqing83@gmail.com>

Coccinelle noticed:
drivers/input/touchscreen/goodix.c:497:8-33: ERROR: Threaded IRQ with no
primary handler requested without IRQF_ONESHOT

Signed-off-by: Guangqing Zhu <zhuguangqing83@gmail.com>
---
 drivers/input/touchscreen/goodix.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c
index c682b028f0a2..725d01e01328 100644
--- a/drivers/input/touchscreen/goodix.c
+++ b/drivers/input/touchscreen/goodix.c
@@ -496,7 +496,8 @@ static int goodix_request_irq(struct goodix_ts_data *ts)
 {
 	return devm_request_threaded_irq(&ts->client->dev, ts->client->irq,
 					 NULL, goodix_ts_irq_handler,
-					 ts->irq_flags, ts->client->name, ts);
+					 ts->irq_flags | IRQF_ONESHOT,
+					 ts->client->name, ts);
 }
 
 static int goodix_check_cfg_8(struct goodix_ts_data *ts, const u8 *cfg, int len)
@@ -1158,7 +1159,7 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)
 		return error;
 	}
 
-	ts->irq_flags = goodix_irq_flags[ts->int_trigger_type] | IRQF_ONESHOT;
+	ts->irq_flags = goodix_irq_flags[ts->int_trigger_type];
 	error = goodix_request_irq(ts);
 	if (error) {
 		dev_err(&ts->client->dev, "request IRQ failed: %d\n", error);
-- 
2.17.1


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

* Re: [PATCH] Input: goodix - Fix missing IRQF_ONESHOT as only threaded handler
  2021-04-16  3:17 [PATCH] Input: goodix - Fix missing IRQF_ONESHOT as only threaded handler zhuguangqing83
@ 2021-04-16  8:47 ` Krzysztof Kozlowski
  2021-04-25  5:30   ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-16  8:47 UTC (permalink / raw)
  To: zhuguangqing83
  Cc: Bastien Nocera, Dmitry Torokhov, Henrik Rydberg, linux-input,
	linux-kernel

On Fri, 16 Apr 2021 at 05:18, <zhuguangqing83@gmail.com> wrote:
>
> From: Guangqing Zhu <zhuguangqing83@gmail.com>
>
> Coccinelle noticed:
> drivers/input/touchscreen/goodix.c:497:8-33: ERROR: Threaded IRQ with no
> primary handler requested without IRQF_ONESHOT
>
> Signed-off-by: Guangqing Zhu <zhuguangqing83@gmail.com>
> ---
>  drivers/input/touchscreen/goodix.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)


Did you test it? There are several patches like this all over the tree
so it looks like "let's fix everything from Coccinelle" because you
ignored at least in some of the cases that the handler is not the
default primary one. I am not saying that the change is bad, but
rather it looks automated and needs more consideration.

Best regards,
Krzysztof
Best regards,
Krzysztof

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

* Re: [PATCH] Input: goodix - Fix missing IRQF_ONESHOT as only threaded handler
  2021-04-16  8:47 ` Krzysztof Kozlowski
@ 2021-04-25  5:30   ` Dmitry Torokhov
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2021-04-25  5:30 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: zhuguangqing83, Bastien Nocera, Henrik Rydberg, linux-input,
	linux-kernel

On Fri, Apr 16, 2021 at 10:47:11AM +0200, Krzysztof Kozlowski wrote:
> On Fri, 16 Apr 2021 at 05:18, <zhuguangqing83@gmail.com> wrote:
> >
> > From: Guangqing Zhu <zhuguangqing83@gmail.com>
> >
> > Coccinelle noticed:
> > drivers/input/touchscreen/goodix.c:497:8-33: ERROR: Threaded IRQ with no
> > primary handler requested without IRQF_ONESHOT
> >
> > Signed-off-by: Guangqing Zhu <zhuguangqing83@gmail.com>
> > ---
> >  drivers/input/touchscreen/goodix.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> 
> Did you test it? There are several patches like this all over the tree
> so it looks like "let's fix everything from Coccinelle" because you
> ignored at least in some of the cases that the handler is not the
> default primary one. I am not saying that the change is bad, but
> rather it looks automated and needs more consideration.

At least the subject is bad because IRQF_ONESHOT is not missing, it is
simply set up elsewhere, the patch itself is a noop. I do not see a
reason to take this.

Thanks.

-- 
Dmitry

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

end of thread, other threads:[~2021-04-25  5:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16  3:17 [PATCH] Input: goodix - Fix missing IRQF_ONESHOT as only threaded handler zhuguangqing83
2021-04-16  8:47 ` Krzysztof Kozlowski
2021-04-25  5:30   ` Dmitry Torokhov

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