mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/omap: dsi: Add missing IRQF_ONESHOT
@ 2021-03-22  8:51 Yang Li
  2021-04-16  9:07 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2021-03-22  8:51 UTC (permalink / raw)
  To: tomba; +Cc: airlied, daniel, dri-devel, linux-kernel, Yang Li

fixed the following coccicheck:
./drivers/gpu/drm/omapdrm/dss/dsi.c:4329:7-27: ERROR: Threaded IRQ with
no primary handler requested without IRQF_ONESHOT

Make sure threaded IRQs without a primary handler are always request
with IRQF_ONESHOT

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index b31d750..844cb0b 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -4326,7 +4326,7 @@ static int omap_dsi_register_te_irq(struct dsi_data *dsi,
 
 	irq_set_status_flags(te_irq, IRQ_NOAUTOEN);
 
-	err = request_threaded_irq(te_irq, NULL, omap_dsi_te_irq_handler,
+	err = request_threaded_irq(te_irq | IRQF_ONESHOT, NULL, omap_dsi_te_irq_handler,
 				   IRQF_TRIGGER_RISING, "TE", dsi);
 	if (err) {
 		dev_err(dsi->dev, "request irq failed with %d\n", err);
-- 
1.8.3.1


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

* Re: [PATCH] drm/omap: dsi: Add missing IRQF_ONESHOT
  2021-03-22  8:51 [PATCH] drm/omap: dsi: Add missing IRQF_ONESHOT Yang Li
@ 2021-04-16  9:07 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2021-04-16  9:07 UTC (permalink / raw)
  To: Yang Li; +Cc: tomba, airlied, daniel, dri-devel, linux-kernel

On Mon, 22 Mar 2021 at 09:53, Yang Li <yang.lee@linux.alibaba.com> wrote:
>
> fixed the following coccicheck:
> ./drivers/gpu/drm/omapdrm/dss/dsi.c:4329:7-27: ERROR: Threaded IRQ with
> no primary handler requested without IRQF_ONESHOT
>
> Make sure threaded IRQs without a primary handler are always request
> with IRQF_ONESHOT
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index b31d750..844cb0b 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -4326,7 +4326,7 @@ static int omap_dsi_register_te_irq(struct dsi_data *dsi,
>
>         irq_set_status_flags(te_irq, IRQ_NOAUTOEN);
>
> -       err = request_threaded_irq(te_irq, NULL, omap_dsi_te_irq_handler,
> +       err = request_threaded_irq(te_irq | IRQF_ONESHOT, NULL, omap_dsi_te_irq_handler,
>                                    IRQF_TRIGGER_RISING, "TE", dsi);

Did you test it? There are several patches like this all over the tree
so it looks like "let's fix everything from Coccinelle". It's a trend
recently... multiple people send these patches. The point is that you
should not blindly follow coccinelle but adjust the change for real
case (e.g. is it a nested interrupt). Without this consideration and
testing - NACK.

Best regards,
Krzysztof

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

end of thread, other threads:[~2021-04-16  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-22  8:51 [PATCH] drm/omap: dsi: Add missing IRQF_ONESHOT Yang Li
2021-04-16  9:07 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®