16/11/2026 15:37, Jack Bond-Preston:
> rte_align32pow2 and rte_align62pow2 will overflow and return incorrect
> values for input values exceeding 1<<31 and 1<<63, respectively. There
> is no way to return a valid result here: the next power of two above
> these values is unrepresentable with 32/64 bit unsigned integers.
>
> Adjust the documentation for these functions to clarify that input
> values above these limits will return invalid results, and thus should
> not be provided to these functions. Additionally, document an existing
> edge case of the implementation: when the input is 0, it returns 0 (not
> a power of 2).
>
> Fixes: 7253e3d2a5b6 ("bitops: move bit count functions")
> Cc: [email protected]
>
> Reported-by: Mark Bulatov <[email protected]>
> Signed-off-by: Jack Bond-Preston <[email protected]>
> Acked-by: Morten Brørup <[email protected]>
Applied, thanks.