git: 5fc42387d704 - main - cxgbe: use order_base_2

From: Doug Moore <dougm_at_FreeBSD.org>
Date: Mon, 24 Jun 2024 07:27:55 UTC
The branch main has been updated by dougm:

URL: https://cgit.FreeBSD.org/src/commit/?id=5fc42387d704295745a9bc05bde07bdf05ed2526

commit 5fc42387d704295745a9bc05bde07bdf05ed2526
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2024-06-24 07:18:42 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2024-06-24 07:18:42 +0000

    cxgbe: use order_base_2
    
    Use order_base_2 in place of an expression.
    
    Reviewed by:    alc, markj
    Differential Revision:  https://reviews.freebsd.org/D45536
---
 sys/dev/cxgbe/t4_sge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 350d385ac490..b4eb0701821a 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -4228,7 +4228,7 @@ qsize_to_fthresh(int qsize)
 {
 	u_int fthresh;
 
-	fthresh = qsize == 0 ? 0 : fls(qsize - 1);
+	fthresh = qsize == 0 ? 0 : order_base_2(qsize);
 	if (fthresh > X_CIDXFLUSHTHRESH_128)
 		fthresh = X_CIDXFLUSHTHRESH_128;