Re: [PATCH v2] x86/lib: Optimize num_digits() and fix INT_MIN overflow

From: David Desobry

Date: Wed Jan 21 2026 - 05:58:55 EST


On 1/21/26 10:54, David Laight wrote:

I'm not familiar enough with the rest of the codebase to know if
changing the function signature to unsigned int is correct here.

In theory you'd need to change the name and all the callers.

David



Agreed. It turns out there were very few callers.

I have just submitted V5, which renames the function to num_digits_u32(), switches the interface to unsigned int, and updates all callers accordingly.

David