x86: use order_base_2

Use order_base_2 in place of expressions involving fls.

Reviewed by:	alc, markj
Differential Revision:	https://reviews.freebsd.org/D45536
This commit is contained in:
Doug Moore 2024-06-24 02:26:23 -05:00
parent 0839258c56
commit 5dbf886104
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ static __inline int
log2(u_int x)
{
return (x == 0 ? -1 : fls(x - 1));
return (x == 0 ? -1 : order_base_2(x));
}
int

View file

@ -189,7 +189,7 @@ static __inline int
mask_width(u_int x)
{
return (x == 0 ? -1 : fls(x - 1));
return (x == 0 ? -1 : order_base_2(x));
}
/*