* possible bug in checkpatch.pl with __deprecated?
@ 2009-12-12 2:44 Nishanth Menon
0 siblings, 0 replies; only message in thread
From: Nishanth Menon @ 2009-12-12 2:44 UTC (permalink / raw)
To: Andy Whitcroft, linux-kernel; +Cc: Pandita, Vikram
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-12 2:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-12 2:44 possible bug in checkpatch.pl with __deprecated? Nishanth Menon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox