git: a303b1455fb5 - main - cxgbe(4): Fix compile warning for !RSS kernels

From: Navdeep Parhar <np_at_FreeBSD.org>
Date: Mon, 24 Nov 2025 23:11:23 UTC
The branch main has been updated by np:

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

commit a303b1455fb5f76b193e10b0a96fabe4e93e9f40
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2025-11-24 21:00:47 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2025-11-24 21:56:00 +0000

    cxgbe(4): Fix compile warning for !RSS kernels
    
    .../sys/dev/cxgbe/t4_main.c:7197:1: warning: unused function 'hashen_to_hashconfig' [-Wunused-function]
     7197 | hashen_to_hashconfig(int hashen)
          | ^~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    
    Reported by:    bz
    Fixes:  d381a6b4a552 cxgbe: use newly exposed RSS hash key API rather than ad-hoc hashing
---
 sys/dev/cxgbe/t4_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 15b3fd94fa54..946eb84457a3 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -7194,11 +7194,10 @@ vi_full_init(struct vi_info *vi)
 {
 	struct adapter *sc = vi->adapter;
 	struct sge_rxq *rxq;
-	int rc, i, j;
+	int rc, i, j, extra;
 	int hashconfig = rss_gethashconfig();
 #ifdef RSS
 	int nbuckets = rss_getnumbuckets();
-	int extra;
 #endif
 
 	ASSERT_SYNCHRONIZED_OP(sc);
@@ -7255,7 +7254,6 @@ vi_full_init(struct vi_info *vi)
 
 	vi->hashen = hashconfig_to_hashen(hashconfig);
 
-#ifdef RSS
 	/*
 	 * We may have had to enable some hashes even though the global config
 	 * wants them disabled.  This is a potential problem that must be
@@ -7289,7 +7287,7 @@ vi_full_init(struct vi_info *vi)
 		CH_ALERT(vi, "UDP/IPv4 4-tuple hashing forced on.\n");
 	if (extra & RSS_HASHTYPE_RSS_UDP_IPV6)
 		CH_ALERT(vi, "UDP/IPv6 4-tuple hashing forced on.\n");
-#endif
+
 	rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, vi->hashen, vi->rss[0],
 	    0, 0);
 	if (rc != 0) {