[PATCH V2] b43: rfkill: use HI enabled bit for all devices

Michael Büsch mb at bu3sch.de
Fri Nov 19 12:15:17 EST 2010


On Fri, 2010-11-19 at 17:59 +0100, Gábor Stefanik wrote: 
> > There's no difference.
> > (int)0 implicitly casts to false and anything else to true.
> 
> I know, just for the sake of coding style.

All of my code in b43 uses 0/1. That's just less characters to write
and is as readable as true/false (to me).
And most b43 G code existed before bool was added to the kernel. ;)

> Same as initializing
> pointers to NULL, not 0 (though AFAIK there are platforms where 0x0 is
> a valid memory address, so using NULL is more than just coding style).

No it is not. C handles the case for NULL not being zero and generates
correct code even if 0 is used. But Linux doesn't support those
platforms due to other reasons (memset(..., 0, ...) on struct
with pointers, for example).

-- 
Greetings Michael.




More information about the b43-dev mailing list