[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1310444606.6925.4.camel@Joe-Laptop>
Date: Mon, 11 Jul 2011 21:23:26 -0700
From: Joe Perches <joe@...ches.com>
To: Roland Vossen <rvossen@...adcom.com>
Cc: apw@...onical.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Checkpatch.pl generates false alarm
On Mon, 2011-07-11 at 16:48 +0200, Roland Vossen wrote:
> Hello Andy,
>
> when I feed attached file to checkpatch, several warnings are given, but
> this one:
>
> WARNING: externs should be avoided in .c files
> #3555: FILE: staging/brcm80211/brcmsmac/main.c:3555:
> + END_FOREACH_BSS
>
> does not seem to make sense. When I place a comment behind the
> END_FOREACH_BSS line, the checkpatch warning disappears.
>
> Let me know if you need additional info to work on this.
I think this code is bad form and confuses checkpatch:
/* update the capability based on current shortslot mode */
FOREACH_BSS(wlc, idx, cfg)
if (!cfg->associated)
continue;
cfg->current_bss->capability &=
~WLAN_CAPABILITY_SHORT_SLOT_TIME;
if (wlc->shortslot)
cfg->current_bss->capability |=
WLAN_CAPABILITY_SHORT_SLOT_TIME;
END_FOREACH_BSS
I think this code is still slightly bad form, but it isn't a problem
for checkpatch:
/* update the capability based on current shortslot mode */
FOREACH_BSS(wlc, idx, cfg) {
if (!cfg->associated)
continue;
cfg->current_bss->capability &=
~WLAN_CAPABILITY_SHORT_SLOT_TIME;
if (wlc->shortslot)
cfg->current_bss->capability |=
WLAN_CAPABILITY_SHORT_SLOT_TIME;
} END_FOREACH_BSS
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists