cxgbe: replace a loop with rounddown_pow_of_two

Replace a loop with a function call.

Reviewed by:	np, alc
Differential Revision:	https://reviews.freebsd.org/D45716
This commit is contained in:
Doug Moore 2024-06-26 03:19:16 -05:00
parent 7e5574f9e5
commit 7d37fcbf52

View file

@ -4349,9 +4349,7 @@ calculate_iaq(struct adapter *sc, struct intrs_and_queues *iaq, int itype,
*/
do {
if (iaq->nrxq > 1) {
do {
iaq->nrxq--;
} while (!powerof2(iaq->nrxq));
iaq->nrxq = rounddown_pow_of_two(iaq->nrxq - 1);
if (iaq->nnmrxq > iaq->nrxq)
iaq->nnmrxq = iaq->nrxq;
}