[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250814230855.128068-7-anthony.l.nguyen@intel.com>
Date: Thu, 14 Aug 2025 16:08:53 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net,
kuba@...nel.org,
pabeni@...hat.com,
edumazet@...gle.com,
andrew+netdev@...n.ch,
netdev@...r.kernel.org
Cc: Dave Ertman <david.m.ertman@...el.com>,
anthony.l.nguyen@...el.com,
Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Aleksandr Loktionov <aleksandr.loktionov@...el.com>,
Marcin Szycik <marcin.szycik@...ux.intel.com>,
Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>
Subject: [PATCH net-next 6/7] ice: cleanup capabilities evaluation
From: Dave Ertman <david.m.ertman@...el.com>
When evaluating the capabilities field, the ICE_AQC_BIT_ROCEV2_LAG and
ICE_AQC_BIT_SRIOV_LAG defines were both not using the BIT operator,
instead simply setting a hex value that set the correct bits. While
not inaccurate, this method is misleading, and when it is expanded in
the following implementation it becomes even more confusing.
Switch to using the BIT() operator to clarify what is being checked.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
Reviewed-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
Signed-off-by: Dave Ertman <david.m.ertman@...el.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
include/linux/net/intel/libie/adminq.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/net/intel/libie/adminq.h b/include/linux/net/intel/libie/adminq.h
index 012b5d499c1a..dbe93f940ef0 100644
--- a/include/linux/net/intel/libie/adminq.h
+++ b/include/linux/net/intel/libie/adminq.h
@@ -192,8 +192,8 @@ LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_list_caps);
#define LIBIE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085
#define LIBIE_AQC_CAPS_NAC_TOPOLOGY 0x0087
#define LIBIE_AQC_CAPS_FW_LAG_SUPPORT 0x0092
-#define LIBIE_AQC_BIT_ROCEV2_LAG 0x01
-#define LIBIE_AQC_BIT_SRIOV_LAG 0x02
+#define LIBIE_AQC_BIT_ROCEV2_LAG BIT(0)
+#define LIBIE_AQC_BIT_SRIOV_LAG BIT(1)
#define LIBIE_AQC_CAPS_FLEX10 0x00F1
#define LIBIE_AQC_CAPS_CEM 0x00F2
--
2.47.1
Powered by blists - more mailing lists