Re: [RFC PATCH v4 2/8] math64: add rem_u64() to just return the remainder
From: Christoph Hellwig
Date: Fri May 31 2024 - 08:39:07 EST
> +#ifndef rem_u64
> +static inline u32 rem_u64(u64 dividend, u32 divisor)
> +{
> + if (is_power_of_2(divisor))
> + return dividend & (divisor - 1);
> + return do_div(dividend, divisor);
> +}
> +#endif
This ifndef seems superflous.
Otherwise looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>