Re: [PATCH V2] [staging] bcm: Replace the BCM_DEBUG_* and BCM_SHOW_* macros with functions

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

 



On Tue, 2012-05-29 at 15:21 +0530, Devendra Naga wrote:
> This patch is made by following the improvements told by Joe Perches,
> replaced the BCM_DEBUG* and BCM_SHOW* macros into functions and added them
> in a file and added macros in the Debug.h file. This patch also improves the if
> check in bcm_show_debug_bitmap,
> 
> the check was
> 	if ((i == 1) || (i == 2) || (i == 4) || (i == 8));
> anyway its a check to find whether its a power of two, and replaces
> it like the following,
> 	if ((i != 0) && !(i & (i - 1)))

So why not using is_power_of_2() ?


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux