lkml.org 
[lkml]   [2014]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] coccinelle: Check for missing NULL terminators in of_device_id tables
On 05/24/14 00:57, Julia Lawall wrote:
> On Fri, 23 May 2014, Stephen Boyd wrote:
>
>> +... struct of_device_id arr[] = {
>> + ...,
>> + {
>> + ...,
>> + .var = E,
>> + ...
>> + }
>> +};
> You shouldn't need any of the ...s in these rules.
>

Hm.. Removing all the ...s in these rules only gives me 3 matches now. I
used to get 5.

Before

$ COCCI=scripts/coccinelle/misc/of_table.cocci make coccicheck MODE=report

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

./sound/soc/pxa/pxa-ssp.c:810:36-37: pxa_ssp_of_ids is not NULL terminated at line 810
./drivers/mfd/tps65218.c:199:32-33: of_tps65218_match_table is not NULL terminated at line 199
./drivers/staging/mt29f_spinand/mt29f_spinand.c:926:34-35: spinand_dt is not NULL terminated at line 926
./drivers/clk/clk-u300.c:1170:1-2: u300_clk_match is not NULL terminated at line 1170
./drivers/clk/st/clkgen-pll.c:655:1-2: c32_gpu_pll_of_match is not NULL terminated at line 655


After

$ COCCI=scripts/coccinelle/misc/of_table.cocci make coccicheck MODE=report

Please check for false positives in the output before submitting a patch.
When using "patch" mode, carefully review the patch before submitting it.

./sound/soc/pxa/pxa-ssp.c:810:36-37: pxa_ssp_of_ids is not NULL terminated at line 810
./drivers/mfd/tps65218.c:199:32-33: of_tps65218_match_table is not NULL terminated at line 199
./drivers/staging/mt29f_spinand/mt29f_spinand.c:926:34-35: spinand_dt is not NULL terminated at line 926


Removing most of the ...s seems to work though. I'll send a v2.

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation



\
 
 \ /
  Last update: 2014-05-27 20:41    [W:0.138 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site