linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: rtc: rtc-wm831x: Add IRQF_ONESHOT flag
@ 2019-07-11 17:56 Hariprasad Kelam
  2019-07-12 13:28 ` Charles Keepax
  2019-07-13 19:43 ` Alexandre Belloni
  0 siblings, 2 replies; 3+ messages in thread
From: Hariprasad Kelam @ 2019-07-11 17:56 UTC (permalink / raw)
  To: Alessandro Zummo, Alexandre Belloni, patches, linux-rtc, linux-kernel

fix below issue reported by coccicheck
drivers//rtc/rtc-wm831x.c:436:7-32: ERROR: Threaded IRQ with no primary
handler requested without IRQF_ONESHOT

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/rtc/rtc-wm831x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index d2e8b21..ccef887 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -435,7 +435,8 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
 
 	ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL,
 				wm831x_alm_irq,
-				IRQF_TRIGGER_RISING, "RTC alarm",
+				IRQF_TRIGGER_RISING | IRQF_ONESHOT,
+				"RTC alarm",
 				wm831x_rtc);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "Failed to request alarm IRQ %d: %d\n",
-- 
2.7.4


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

* Re: [PATCH] drivers: rtc: rtc-wm831x: Add IRQF_ONESHOT flag
  2019-07-11 17:56 [PATCH] drivers: rtc: rtc-wm831x: Add IRQF_ONESHOT flag Hariprasad Kelam
@ 2019-07-12 13:28 ` Charles Keepax
  2019-07-13 19:43 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2019-07-12 13:28 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Alessandro Zummo, Alexandre Belloni, patches, linux-rtc, linux-kernel

On Thu, Jul 11, 2019 at 11:26:15PM +0530, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> drivers//rtc/rtc-wm831x.c:436:7-32: ERROR: Threaded IRQ with no primary
> handler requested without IRQF_ONESHOT
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/rtc/rtc-wm831x.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
> index d2e8b21..ccef887 100644
> --- a/drivers/rtc/rtc-wm831x.c
> +++ b/drivers/rtc/rtc-wm831x.c
> @@ -435,7 +435,8 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
>  
>  	ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL,
>  				wm831x_alm_irq,
> -				IRQF_TRIGGER_RISING, "RTC alarm",
> +				IRQF_TRIGGER_RISING | IRQF_ONESHOT,
> +				"RTC alarm",

I guess this code pre-dates the check in the core that doesn't
allow the default handler with no oneshot (if you check the comment
it definitely looks like this would have worked before that check
was added).

I am a little worried there might be a bit more required to fix this
one. I seem to remember edge triggered IRQs and ONESHOT don't play
very nicely together, but on the flip side this is just a virtual
domain used within the chip so in practice it is probably safe.

A tentative ack from me, but I would certainly appreciate any
additional opinions.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>


Thanks,
Charles

>  				wm831x_rtc);
>  	if (ret != 0) {
>  		dev_err(&pdev->dev, "Failed to request alarm IRQ %d: %d\n",
> -- 
> 2.7.4
> 

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

* Re: [PATCH] drivers: rtc: rtc-wm831x: Add IRQF_ONESHOT flag
  2019-07-11 17:56 [PATCH] drivers: rtc: rtc-wm831x: Add IRQF_ONESHOT flag Hariprasad Kelam
  2019-07-12 13:28 ` Charles Keepax
@ 2019-07-13 19:43 ` Alexandre Belloni
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2019-07-13 19:43 UTC (permalink / raw)
  To: Hariprasad Kelam; +Cc: Alessandro Zummo, patches, linux-rtc, linux-kernel

On 11/07/2019 23:26:15+0530, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> drivers//rtc/rtc-wm831x.c:436:7-32: ERROR: Threaded IRQ with no primary
> handler requested without IRQF_ONESHOT
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> ---
>  drivers/rtc/rtc-wm831x.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2019-07-13 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 17:56 [PATCH] drivers: rtc: rtc-wm831x: Add IRQF_ONESHOT flag Hariprasad Kelam
2019-07-12 13:28 ` Charles Keepax
2019-07-13 19:43 ` Alexandre Belloni

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