public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ethan zhao <ethan.zhao@oracle.com>
To: Joe Perches <joe@perches.com>
Cc: anish@chelsio.com, apw@canonical.com,
	linux-kernel@vger.kernel.org, ethan.kernel@gmail.com,
	joe.jin@oracle.com
Subject: Re: [Bug report] Hit false positives bug with script/checkpatch.pl
Date: Wed, 16 Jul 2014 14:55:42 +0800	[thread overview]
Message-ID: <53C621EE.9010701@oracle.com> (raw)
In-Reply-To: <1405484432.14773.19.camel@joe-AO725>


On 2014/7/16 12:20, Joe Perches wrote:
> On Wed, 2014-07-16 at 10:50 +0800, Ethan Zhao wrote:
>> Hi,
>>       I hit a false positives bug when run script/checkpatch.pl to my patch,
>> It reported  errors to following macro definition, but in fact the macro is
>> correct, I couldn't change that macro according to the error message output
>> by script/checkpatch.pl. because of this bug, my patch was rejected by some
>> guy's patchwork.
> You could tell the guy checkpatch isn't always right.
  He doesn't see my patch, because he filters it out for this issue.
>
> You could also change the macro to something like:
>
> #define NETXEN_NIC_STAT(name, m)				\
> {								\
> 	.name = name,						\
> 	.type = m,						\
> 	.sizeof_stat = FIELD_SIZEOF(struct netxen_adapter, m),	\
> 	.stat_offset = offsetof(struct netxen_adapter, m)	\
> }
  This works for me, thanks for your reply.

  Ethan
> and change the uses like:
>
> static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = {
> 	NETXEN_NIC_STAT("xmit called", stats.xmitcalled),
> 	NETXEN_NIC_STAT("xmit_finished", stats.xmitfinished),
>
> etc...
>
>


      parent reply	other threads:[~2014-07-16  6:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  2:50 [Bug report] Hit false positives bug with script/checkpatch.pl Ethan Zhao
2014-07-16  4:20 ` Joe Perches
2014-07-16  5:39   ` Anish Bhatt
2014-07-16  7:01     ` Ethan Zhao
2014-07-16  6:55   ` ethan zhao [this message]

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=53C621EE.9010701@oracle.com \
    --to=ethan.zhao@oracle.com \
    --cc=anish@chelsio.com \
    --cc=apw@canonical.com \
    --cc=ethan.kernel@gmail.com \
    --cc=joe.jin@oracle.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox