staging/brcm80211: remove assignments in if conditions

Henry Ptasinski henryp at broadcom.com
Wed Sep 29 17:29:09 UTC 2010


On Mon, Sep 27, 2010 at 01:37:12PM -0700, Jason Cooper wrote:
> Greg,
> 
> I'm now working on bringing brcm80211/brcmfmac/ up to par as far as removal
> of checkpatch errors.
> 
> Please note, for the following case, I chose the literal interpretation.
> I could use a sanity check.
> 
> if ((a = some_func(args)) || (b = other_func(more_args))) {
> 	do_some_stuff;
> }
> 
> Became:
> 
> a = some_func(args);
> if (a) {
> 	do_some_stuff;
> } else {
> 	b = other_func(more_args);
> 	if (b)
> 		do_some_stuff;
> }
> 
> ie, other_func() will _only_ be executed if 'a' is zero.  I'm not sure if
> this is what the original authors intended, but it is how I believe it will,
> and has been, behaving.  ;-)

Jason,

Yes, this looks like the right interpretation.

I tried out your patch series, and I'm hitting an assert at line 2237 in
dhd_linux.c.  There's a small bug in your patch to dhd_linux.c, but that's no
the root of the problem.  I'll do a little more digging.

And thanks for the help cleaning up!
-- 
Henry Ptasinski				+1-408-543-3316
Broadcom Home And Wireless Networking	henryp at broadcom.com




More information about the devel mailing list