Date: Wed, 26 Jun 2024 08:21:03 GMT From: Doug Moore <dougm@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 7d37fcbf52b1 - main - cxgbe: replace a loop with rounddown_pow_of_two Message-ID: <202406260821.45Q8L3W3021106@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=7d37fcbf52b14785623bdbceb97bba8044fb739e commit 7d37fcbf52b14785623bdbceb97bba8044fb739e Author: Doug Moore <dougm@FreeBSD.org> AuthorDate: 2024-06-26 08:19:16 +0000 Commit: Doug Moore <dougm@FreeBSD.org> CommitDate: 2024-06-26 08:19:16 +0000 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 --- sys/dev/cxgbe/t4_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 96407e7ebaba..08cad0324c28 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202406260821.45Q8L3W3021106>