From: Nishanth Menon <nm@ti.com>
To: Andy Whitcroft <apw@canonical.com>, <linux-kernel@vger.kernel.org>
Cc: "Pandita, Vikram" <vikram.pandita@ti.com>
Subject: possible bug in checkpatch.pl with __deprecated?
Date: Fri, 11 Dec 2009 20:44:44 -0600 [thread overview]
Message-ID: <4B23039C.8040004@ti.com> (raw)
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
reply other threads:[~2009-12-12 2:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B23039C.8040004@ti.com \
--to=nm@ti.com \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vikram.pandita@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.