On 2026-10-28T05:50:48, Ana Bobillo <[email protected]> wrote:
> treewide: Use is_power_of_2() from linux/log2.h
>
> The btrfs code and the bcm2835_sdhost driver each define their own
> is_power_of_2(), which clashes with the one in linux/log2.h once a
> header they include brings that in, as include/blk.h does after the next
> patch. Drop both and use the common one.
>
> The btrfs copy is the same as the common one. The bcm2835_sdhost copy
> takes a u64 and also takes 0 as a power of two; its only caller checks
> the block size of a data transfer, which the MMC core never sets to 0,
> and the Linux driver it comes from makes the same check with the common
> is_power_of_2().
>
> Signed-off-by: Ana Bobillo <[email protected]>
>
>  drivers/mmc/bcm2835_sdhost.c | 6 +-----
>  fs/btrfs/compat.h            | 6 +-----
>  2 files changed, 2 insertions(+), 10 deletions(-)

Reviewed-by: Simon Glass <[email protected]>

Reply via email to