lkml.org 
[lkml]   [2014]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Bug report] Hit false positives bug with script/checkpatch.pl
From
Date
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.

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) \
}

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...




\
 
 \ /
  Last update: 2014-07-16 07:42    [W:0.044 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site