On Tue, Oct 07, 2025 at 01:11:46PM -0300, Jason Gunthorpe wrote:

> +/*
> + * Return the highest value such that:
> + *    ffz_t(u32, U32_MAX) == UNDEFINED
> + *    ffz_t(u32, 0) == 0
> + *    ffz_t(u32, 1) == 1
> + *    log_mod(a, ret) == log_to_max_int(ret)
> + * aka find first zero bit
> + */
> +static inline unsigned int ffz32(u32 a)
> +{
> +     return ffz(a);
> +}
> +static inline unsigned int ffz64(u64 a)
> +{
> +     if (sizeof(u64) == sizeof(unsigned long))
> +             return ffz32(a);

This should be ffz(a), it breaks everything like this. I must have
run the kunits out of sequence to have missed this.

I updated the github

Jason

Reply via email to