All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Ertman <david.m.ertman@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Subject: [Intel-wired-lan] [PATCH iwl-next v3 2/8] ice: replace u8 elements with bool where
Date: Mon,  9 Jun 2025 15:11:34 +0200	[thread overview]
Message-ID: <20250609131141.758051-3-david.m.ertman@intel.com> (raw)
In-Reply-To: <20250609131141.758051-1-david.m.ertman@intel.com>

appropriate

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>
---
 drivers/net/ethernet/intel/ice/ice_common.c | 4 ++--
 drivers/net/ethernet/intel/ice/ice_type.h   | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index f7fd0a2451de..29a02a0348b1 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -2219,10 +2219,10 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps,
 			  caps->reset_restrict_support);
 		break;
 	case ICE_AQC_CAPS_FW_LAG_SUPPORT:
-		caps->roce_lag = !!(number & ICE_AQC_BIT_ROCEV2_LAG);
+		caps->roce_lag = number & ICE_AQC_BIT_ROCEV2_LAG;
 		ice_debug(hw, ICE_DBG_INIT, "%s: roce_lag = %u\n",
 			  prefix, caps->roce_lag);
-		caps->sriov_lag = !!(number & ICE_AQC_BIT_SRIOV_LAG);
+		caps->sriov_lag = number & ICE_AQC_BIT_SRIOV_LAG;
 		ice_debug(hw, ICE_DBG_INIT, "%s: sriov_lag = %u\n",
 			  prefix, caps->sriov_lag);
 		break;
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h
index 3d68f465952d..e40ea754f91b 100644
--- a/drivers/net/ethernet/intel/ice/ice_type.h
+++ b/drivers/net/ethernet/intel/ice/ice_type.h
@@ -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;
-- 
2.49.0


  parent reply	other threads:[~2025-06-09 21:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 13:11 [Intel-wired-lan] [PATCH iwl-next v3 0/8] ice: implement SRIOV VF Active-Active LAG Dave Ertman
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 1/8] ice: Remove casts on void pointers in LAG code Dave Ertman
2025-06-09 13:11 ` Dave Ertman [this message]
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 3/8] ice: Add driver specific prefix to LAG defines Dave Ertman
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 4/8] ice: move LAG function in code to prepare for Dave Ertman
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 5/8] ice: Cleanup variable initialization in LAG code Dave Ertman
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 6/8] ice: cleanup capabilities evaluation Dave Ertman
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 7/8] ice: breakout common LAG code into helpers Dave Ertman
2025-06-09 13:11 ` [Intel-wired-lan] [PATCH iwl-next v3 8/8] ice: Implement support for SRIOV VFs across Active/Active bonds Dave Ertman
2025-06-11 13:10   ` Marcin Szycik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250609131141.758051-3-david.m.ertman@intel.com \
    --to=david.m.ertman@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=przemyslaw.kitszel@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.