From: Andy Whitcroft <apw@shadowen.org>
To: Satyam Sharma <satyam@infradead.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: error from checkpatch.pl version 0.10
Date: Thu, 20 Sep 2007 16:53:02 +0100 [thread overview]
Message-ID: <20070920155302.GA29224@shadowen.org> (raw)
In-Reply-To: <alpine.LFD.0.999.0709201916400.17093@enigma.security.iitk.ac.in>
On Thu, Sep 20, 2007 at 07:19:59PM +0530, Satyam Sharma wrote:
>
>
> On Thu, 20 Sep 2007, Tetsuo Handa wrote:
> >
> > I checked my patch using checkpatch.pl version 0.10
> > and I got the following error.
> >
> > ERROR: need consistent spacing around '*' (ctx:WxV)
> > #2334: FILE: security/tomoyo/common.c:2306:
> > +static unsigned int tmy_poll(struct file *file, poll_table *wait)
> > ^
>
> Looks like a checkpatch.pl bug to me -- that was nothing to warn about.
Hmm yeah this is a false positive, its hard to detect correctly. Some
fool decided to use * as both a unary and binary operator and made life
very hard indeed. Most kernel defined types end _t to aid recognition.
This one does no. I may special case it. Either way ignore its
moaning!
> > What action should I take?
> > Ignore this error because "poll_table" is used everywhere?
> > Replace "poll_table" with "struct poll_table_struct" according to
> > definition of "poll_table"?
>
> Yeah, this would be better to do anyway (and rename poll_table_struct
> to just poll_table).
>
> > typedef struct poll_table_struct {
> > poll_queue_proc qproc;
> > } poll_table;
>
> So:
>
> struct poll_table {
> poll_queue_proc qproc;
> };
>
> In general the kernel's codingstyle consensus is to avoid adding typedefs.
-apw
next prev parent reply other threads:[~2007-09-20 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-20 12:56 error from checkpatch.pl version 0.10 Tetsuo Handa
2007-09-20 13:49 ` Satyam Sharma
2007-09-20 14:30 ` Tetsuo Handa
2007-09-20 15:53 ` Andy Whitcroft [this message]
2007-09-21 13:09 ` Jan Engelhardt
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=20070920155302.GA29224@shadowen.org \
--to=apw@shadowen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=satyam@infradead.org \
/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.