]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ice: cleanup capabilities evaluation
authorDave Ertman <david.m.ertman@intel.com>
Mon, 16 Jun 2025 11:03:21 +0000 (13:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 14 Aug 2025 15:57:28 +0000 (08:57 -0700)
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@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
include/linux/net/intel/libie/adminq.h

index 012b5d499c1a2cfc2322c082aa357e0fc3e71dc8..dbe93f940ef083fafcfce71040717557c3fc8622 100644 (file)
@@ -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