Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 522F8C54E93 for ; Tue, 20 May 2025 19:40:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2A1FC6109F; Tue, 20 May 2025 19:40:00 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id bj9HDnMXT5nh; Tue, 20 May 2025 19:39:59 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 09F3C610B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1747769999; bh=C3nnJ6oQlD2ATaLqTA6oRPsA/tHUx1YHfphzrgtRO4Q=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=O7fwPy0yHHu4qFDNm8IbAu70KsNe9UV22G6Uwh/69dTRvsWHeJzu3vgdoFDaZVBTT KELeYr2KwRUFIdH4W5si20JExiUAkZA7/3Aa4ZnCURVNMJvBnBeckfMC1jeto3mj/L RxgUHgz+rpnjfoj3Hg8n+3dTz/J0dUEAFFrHZ199hORjWXVXPa5QOrt/jWN/JBATQZ 6JrNoBG/eQBGgmFvW4sVpcQPZUmfVnE2OIj6ychY1pblE1cJ3SbrggrcKv3g9yqOmi gdGkQLOwglw7z2qI5N2tvKVwlvyD42qttGivHolTSy8HjKh0l/WLqSsLPtn39x6v62 gUGn5VMuAngmA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 09F3C610B1; Tue, 20 May 2025 19:39:59 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id 6D9EBD4 for ; Tue, 20 May 2025 19:39:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6AC6881E07 for ; Tue, 20 May 2025 19:39:56 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cracA5TxS5eA for ; Tue, 20 May 2025 19:39:56 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.7; helo=mgamail.intel.com; envelope-from=david.m.ertman@intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org BFA3281DF3 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org BFA3281DF3 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by smtp1.osuosl.org (Postfix) with ESMTPS id BFA3281DF3 for ; Tue, 20 May 2025 19:39:55 +0000 (UTC) X-CSE-ConnectionGUID: cuvBh80tRW+yDQ9Dan6i9Q== X-CSE-MsgGUID: 3gecEVoWTW6uuIxugqi+bg== X-IronPort-AV: E=McAfee;i="6700,10204,11439"; a="75123546" X-IronPort-AV: E=Sophos;i="6.15,302,1739865600"; d="scan'208";a="75123546" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2025 12:39:55 -0700 X-CSE-ConnectionGUID: xFq5zES8TCGA1Zn0Onc8Fg== X-CSE-MsgGUID: vy+v9qsPRamfwY/dclC6pw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,302,1739865600"; d="scan'208";a="140198871" Received: from dmert-vmdev.jf.intel.com ([10.165.17.51]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2025 12:39:54 -0700 From: Dave Ertman To: intel-wired-lan@lists.osuosl.org Cc: Przemek Kitszel Date: Tue, 20 May 2025 15:39:24 -0400 Message-ID: <20250520193930.3763888-3-david.m.ertman@intel.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250520193930.3763888-1-david.m.ertman@intel.com> References: <20250520193930.3763888-1-david.m.ertman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747769996; x=1779305996; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z2es/tY4Vv86xArJxnQz8mDZrDjH7nKpNM4N584f5TE=; b=d7+ci3lDxvjWf9spwJKj8ZObPcM2FHup2tKia7Eor/Cyq3KiLfeWcut1 myliOuNWC+tnraUfxb/dX3CkpVVo+KdUFhhdwQMQ+TMlg9EE/JMejItGF XQkj4FSyW1kLNv/zmcAd3xIgz69uAVQtxQp02xn3aLCzhW3ItaeBMKMVk iSWCa5VbWDT8hkCjb+5+HtWcUezgkq7EubMg5DKGkIt9vwKy8CSMcJ1P4 jVecNtY3q5HWrm1yQXCJwdvULh7QAiy18koWNJIIxravC+REnYZfvl/Ga AFFzEUvgtN7HPn6jkxst3FvS4Q9VYATIbgz+d8L4DxpdzS0X5ggZkuvA2 A==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=d7+ci3lD Subject: [Intel-wired-lan] [PATCH iwl-next v2 2/8] [PATCH iwl-next 2/8] ice: replace u8 elements with bool where X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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 Signed-off-by: Dave Ertman --- 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