Re: [PATCH V2 3/3] staging/rtl8192u: use for loop to assign bit shifted addr

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

 



Hi Joe,

On Wed, Jun 20, 2012 at 12:49 AM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> It's also got a bit of code duplication.
> Maybe something like:
>
>        if (priv->epromtype == EPROM_93c56) {
>                addr_len = 8;
>        else
>                addr_len = 6;
>
>        test_bit = 1 << (addr_len - 1);
>        for (i = 0; i < addr_len; i++) {
>                addr_str[i] = addr & test_bit;
>                test_bit >>= 1;
>        }
>
Ahhh, true.

V3 sending :-)

Thanks,
Devendra.
>
_______________________________________________
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