The branch main has been updated by dougm:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7d37fcbf52b14785623bdbceb97bba8044fb739e

commit 7d37fcbf52b14785623bdbceb97bba8044fb739e
Author:     Doug Moore <[email protected]>
AuthorDate: 2024-06-26 08:19:16 +0000
Commit:     Doug Moore <[email protected]>
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;
                }

Reply via email to