Thread (7 messages) 7 messages, 3 authors, 2016-02-18

[rtc-linux] Re: [PATCH] rtc: max77686: fix irqf_oneshot.cocci warnings

From: Valentin Rothberg <hidden>
Date: 2016-02-18 08:46:12
Also in: lkml


Hi Krzysztof,

On 2/18/16 9:13 AM, Krzysztof Kozlowski wrote:
On 18.02.2016 17:06, Valentin Rothberg wrote:
quoted
From: kbuild test robot <redacted>

 Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
 threaded IRQs without a primary handler need to be requested with
 IRQF_ONESHOT, otherwise the request will fail.

 So pass the IRQF_ONESHOT flag in this case.

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

CC: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Fengguang Wu <redacted>
Signed-off-by: Valentin Rothberg <redacted>
---
 drivers/rtc/rtc-max77686.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Nack, because:
1. AFAIR this is a false positive.
Looking at kernel/irq/manage.c +1250 such requests will be rejected
unconditionally when the primary handler is NULL, except when the chip
is marked to be oneshot safe.

Is there another semantic that I am not aware of?  In case the script
produces false positives, I will change it immediately.
2. Was it tested? Was it reproduced? Was the bug actually spotted or
just coccicheck pointed this and you assumed that "request will fail"?

Coccicheck is a great tool... but not necessarily for pointing run-time
bugs.
I did not test it.  To me the issue rather seems seems like something
where Coccinelle is really good at, static analysis.

Kind regards,
 Valentin

-- 
-- 
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
--- 
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help