mlx5: use roundup_pow_of_two

Use roundup_pow_of_two in place of an expression.

Reviewed by:	alc, markj
Differential Revision:	https://reviews.freebsd.org/D45536
This commit is contained in:
Doug Moore 2024-06-24 02:22:52 -05:00
parent 87177ce3aa
commit dc048255b3

View file

@ -2331,7 +2331,7 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs)
* Stride size is 16 * (n + 1), as the first segment is
* control.
*/
n = (1 << fls(howmany(r, MLX5E_MAX_RX_BYTES))) - 1;
n = roundup_pow_of_two(1 + howmany(r, MLX5E_MAX_RX_BYTES)) - 1;
if (n > MLX5E_MAX_BUSDMA_RX_SEGS)
return (-ENOMEM);