Re: [PATCH v4 2/4] lib/find_bit: create find_first_zero_bit_le()

From: Andy Shevchenko
Date: Mon Sep 19 2022 - 09:46:01 EST


On Wed, Sep 14, 2022 at 07:07:28PM -0700, Yury Norov wrote:
> find_first_zero_bit_le() is an alias to find_next_zero_bit_le(),
> despite that 'next' is known to be slower than 'first' version.
>
> Now that we have common FIND_FIRST_BIT() macro helper, it's trivial
> to implement find_first_zero_bit_le() as a real function.

...

> +#ifdef __BIG_ENDIAN

Probably you want to add a blank line here.

> +#ifndef find_first_zero_bit_le
> +/*
> + * Find the first cleared bit in an LE memory region.
> + */
> +unsigned long _find_first_zero_bit_le(const unsigned long *addr, unsigned long size)
> +{
> + return FIND_FIRST_BIT(~addr[idx], swab, size);
> +}
> +EXPORT_SYMBOL(_find_first_zero_bit_le);
> +#endif
> +
> +#endif /* __BIG_ENDIAN */

--
With Best Regards,
Andy Shevchenko