Search Linux Wireless

Re: [PATCH] wl12xx: use a bitmask instead of list of booleans in scanned_ch

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

 



On Mon, Mar 21, 2011 at 11:19 PM, Luciano Coelho <coelho@xxxxxx> wrote:
> We were using an array of booleans to mark the channels we had already scanned.  This was causing a sparse error, because bool is not a type with defined size.  To fix this, use bitmasks instead, which is much cleaner anyway.
>
> Thanks Johannes Berg for the idea.
>
> Signed-off-by: Luciano Coelho <coelho@xxxxxx>
> ---
[...]
> +       /* make sure all our channels fit in the scanned_ch bitmask */
> +       BUG_ON(ARRAY_SIZE(wl1271_channels) + ARRAY_SIZE(wl1271_channels_5ghz) >
> +              WL1271_MAX_CHANNELS);

maybe use BUILD_BUG_ON here?

Eliad.
--
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