mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 05:36:10 +00:00
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:
parent
7e5574f9e5
commit
7d37fcbf52
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue