Search Linux Wireless

Re: [PATCH 017/119] staging: brcm80211: change FOREACH_BSS macro to remove checkpatch error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 29, 2011 at 04:46:41PM -0700, Franky Lin wrote:
>  #define FOREACH_BSS(wlc, idx, cfg) \
> -	for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \
> -		if ((cfg = (wlc)->bsscfg[idx]))
> +	for (idx = 0, cfg = (wlc)->bsscfg[idx]; \
> +	     idx < WLC_MAXBSSCFG; cfg = (wlc)->bsscfg[++idx]) \
> +		if (cfg)
>  

That's pretty ugly.  Better to leave the original in and ignore the
checkpatch warning.  Or maybe do something like this:

	for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) { \
		cfg = (wlc)->bsscfg[idx];		  \
		if (!cfg)				  \
			continue;			  \

Then #define END_FOREACH_BSS() }

Btw, this patchset has over 100 patches so unless there is something
drastically wrong lets just apply it as is and fix up any complaints
that people have in later patches.  It sucks when people resend huge
patchsets and we have to review everything again.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux