Skip to content

Commit

Permalink
coccinelle: platform_get_irq: Fix parse error
Browse files Browse the repository at this point in the history
When do coccicheck, I get this error:

spatch -D report --no-show-diff --very-quiet --cocci-file
./scripts/coccinelle/api/platform_get_irq.cocci --include-headers
--dir . -I ./arch/x86/include -I ./arch/x86/include/generated -I ./include
 -I ./arch/x86/include/uapi -I ./arch/x86/include/generated/uapi
 -I ./include/uapi -I ./include/generated/uapi
 --include ./include/linux/kconfig.h --jobs 192 --chunksize 1
minus: parse error:
  File "./scripts/coccinelle/api/platform_get_irq.cocci", line 24, column 9, charpos = 355
  around = '\(',
  whole content = if ( ret \( < \| <= \) 0 )

In commit e564768 ("fpga: Remove dev_err() usage
after platform_get_irq()") log, I found the semantic patch,
it fix this issue.

Fixes: 98051ba ("coccinelle: Add script to check for platform_get_irq() excessive prints")
Signed-off-by: YueHaibing <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
YueHaibing authored and gregkh committed Sep 6, 2019
1 parent 1d5a013 commit ca7ce5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/coccinelle/api/platform_get_irq.cocci
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ platform_get_irq
platform_get_irq_byname
)(E, ...);

if ( ret \( < \| <= \) 0 )
if ( \( ret < 0 \| ret <= 0 \) )
{
(
if (ret != -EPROBE_DEFER)
Expand All @@ -47,7 +47,7 @@ platform_get_irq
platform_get_irq_byname
)(E, ...);

if ( ret \( < \| <= \) 0 )
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
Expand All @@ -74,7 +74,7 @@ platform_get_irq
platform_get_irq_byname
)(E, ...);

if ( ret \( < \| <= \) 0 )
if ( \( ret < 0 \| ret <= 0 \) )
{
(
if (ret != -EPROBE_DEFER)
Expand Down

0 comments on commit ca7ce5a

Please sign in to comment.