Search Linux Wireless

Re: [PATCH] b43: use the bitrev helpers rather than rolling a private one

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

 



On Tuesday 13 May 2008 21:55:18 Harvey Harrison wrote:
> The 4-bit reversal flip_4bit is replaced with the bitrev helper
> bitrev8 and a 4-bit shift.  The B43_WARN is moved to the location
> where a register is read from for checking there.  The other caller
> explicitly passes an array index which is guaranteed to be within range
> and so a B43_WARN is not added there.
> 
> Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>

ACK

But I'd prefer if we had something like the following
and use that:

#define bitrev4(x)	(bitrev8(x) >> 4)

This way the confusing (confusing to me :) ) shifts in the code would go away.
I have a hard time realizing that
bitrev8(x) >> 3
does actually mean
bitrev4(x) << 1
Maybe I'm just stupid, though. :)

> @@ -3069,13 +3053,13 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
>  		}
>  		radio_stacksave(0x0078);
>  		tmp = (b43_radio_read16(dev, 0x0078) & 0x001E);
> -		flipped = flip_4bit(tmp);
> +		B43_WARN_ON(tmp > 15);
> +		flipped = bitrev8(tmp) >> 4;
>  		if (flipped < 10 && flipped >= 8)


-- 
Greetings Michael.
--
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