lkml.org 
[lkml]   [2009]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectpossible bug in checkpatch.pl with __deprecated?
Hi Andy, Folks,

I have two patches of the code. I goofed up on [1] and seemingly fixed
it on [2] as per checkpatch.pl(I am using pastebin to prevent spamming
the mailing list - apologies on that). This behavior seems to be related
to the usage __deprecated with structure fields.

The code in question is:
(fail.patch)
struct omap_opp {
bool enabled;
unsigned long rate;
u8 opp_id __deprecated;
u16 vsel __deprecated;
};
Vs:
(ok.patch)
struct omap_opp {
bool enabled;
unsigned long rate;
u8 __deprecated opp_id;
u16 __deprecated vsel;
};

kernel tag used: v2.6.32

$scripts/checkpatch.pl --strict ../fail.patch:

ERROR: space prohibited after that '&&' (ctx:WxW)
#380: FILE: arch/arm/plat-omap/opp.c:25:
+#define OPP_TERM(opp) (!(opp)->rate && !(opp)->vsel && !(opp)->enabled)
^

ERROR: space prohibited after that '*' (ctx:WxW)
#389: FILE: arch/arm/plat-omap/opp.c:34:
+ return (((vsel * 125) + 6000)) * 100;
^

total: 2 errors, 0 warnings, 0 checks, 511 lines checked

../fail.patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


$scripts/checkpatch.pl --strict ../ok.patch
total: 0 errors, 0 warnings, 0 checks, 511 lines checked

../ok.patch has no obvious style problems and is ready for submission.

The failure with fail.patch seems to be a false positive and wonder if
someone has seen this before.

Just checking if someone has seen this issue before. (musing as to what
the ideal style of __deprecated is)..

--
Regards,
Nishanth Menon

Ref:
[1] http://pastebin.mozilla.org/690162 (fail.patch)
[2] http://pastebin.mozilla.org/690160 (ok.patch)
Usage in line 150


\
 
 \ /
  Last update: 2009-12-12 03:47    [W:0.022 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site