]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ice: replace u8 elements with bool where appropriate
authorDave Ertman <david.m.ertman@intel.com>
Mon, 16 Jun 2025 11:03:17 +0000 (13:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 14 Aug 2025 15:57:28 +0000 (08:57 -0700)
In preparation for the new LAG functionality implementation, there are
a couple of existing LAG elements of the capabilities struct that should
be bool instead of u8.  Since we are adding a new element to this struct
that should also be a bool, fix the existing LAG u8 in this patch and
eliminate !! operators where possible.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@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>
drivers/net/ethernet/intel/ice/ice_common.c
drivers/net/ethernet/intel/ice/ice_type.h

index 003d60a4db210e0404afc76841b36fb9bc94cffb..209f42045fea5ca3c3158e8bd9b4e28918b6e969 100644 (file)
@@ -2418,10 +2418,10 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps,
                          caps->reset_restrict_support);
                break;
        case LIBIE_AQC_CAPS_FW_LAG_SUPPORT:
-               caps->roce_lag = !!(number & LIBIE_AQC_BIT_ROCEV2_LAG);
+               caps->roce_lag = number & LIBIE_AQC_BIT_ROCEV2_LAG;
                ice_debug(hw, ICE_DBG_INIT, "%s: roce_lag = %u\n",
                          prefix, caps->roce_lag);
-               caps->sriov_lag = !!(number & LIBIE_AQC_BIT_SRIOV_LAG);
+               caps->sriov_lag = number & LIBIE_AQC_BIT_SRIOV_LAG;
                ice_debug(hw, ICE_DBG_INIT, "%s: sriov_lag = %u\n",
                          prefix, caps->sriov_lag);
                break;
index 03c6c271865d0e39ac6596327b9befc5e81c60f0..2b07d5e488478839c4dc5dfc3bdbd8d9eb289921 100644 (file)
@@ -293,8 +293,9 @@ struct ice_hw_common_caps {
        u8 dcb;
        u8 ieee_1588;
        u8 rdma;
-       u8 roce_lag;
-       u8 sriov_lag;
+
+       bool roce_lag;
+       bool sriov_lag;
 
        bool nvm_update_pending_nvm;
        bool nvm_update_pending_orom;