From patchwork Tue Nov 30 18:12:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12648001 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51C0DC433EF for ; Tue, 30 Nov 2021 18:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245482AbhK3Sdt (ORCPT ); Tue, 30 Nov 2021 13:33:49 -0500 Received: from mga01.intel.com ([192.55.52.88]:53991 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239522AbhK3Sdp (ORCPT ); Tue, 30 Nov 2021 13:33:45 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10184"; a="260251840" X-IronPort-AV: E=Sophos;i="5.87,276,1631602800"; d="scan'208";a="260251840" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 10:14:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,276,1631602800"; d="scan'208";a="499878826" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga007.jf.intel.com with ESMTP; 30 Nov 2021 10:14:00 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Shiraz Saleem , netdev@vger.kernel.org, anthony.l.nguyen@intel.com, linux-rdma@vger.kernel.org, mustafa.ismail@intel.com, jacob.e.keller@intel.com, parav@nvidia.com, jiri@nvidia.com Subject: [PATCH net-next 1/2] net/ice: Fix boolean assignment Date: Tue, 30 Nov 2021 10:12:42 -0800 Message-Id: <20211130181243.3707618-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211130181243.3707618-1-anthony.l.nguyen@intel.com> References: <20211130181243.3707618-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Shiraz Saleem vbool in ice_devlink_enable_roce_get can be assigned to a non-0/1 constant. Fix this assignment of vbool to be 0/1. Fixes: e523af4ee560 ("net/ice: Add support for enable_iwarp and enable_roce devlink param") Suggested-by: Parav Pandit Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c index 478412b28a76..1cfe918db8b9 100644 --- a/drivers/net/ethernet/intel/ice/ice_devlink.c +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c @@ -436,7 +436,7 @@ ice_devlink_enable_roce_get(struct devlink *devlink, u32 id, { struct ice_pf *pf = devlink_priv(devlink); - ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2; + ctx->val.vbool = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ? true : false; return 0; } From patchwork Tue Nov 30 18:12:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 12648003 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E29CCC433FE for ; Tue, 30 Nov 2021 18:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239522AbhK3Sdv (ORCPT ); Tue, 30 Nov 2021 13:33:51 -0500 Received: from mga01.intel.com ([192.55.52.88]:54000 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245475AbhK3Sdt (ORCPT ); Tue, 30 Nov 2021 13:33:49 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10184"; a="260251841" X-IronPort-AV: E=Sophos;i="5.87,276,1631602800"; d="scan'208";a="260251841" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2021 10:14:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,276,1631602800"; d="scan'208";a="499878828" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga007.jf.intel.com with ESMTP; 30 Nov 2021 10:14:00 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Shiraz Saleem , netdev@vger.kernel.org, anthony.l.nguyen@intel.com, linux-rdma@vger.kernel.org, mustafa.ismail@intel.com, jacob.e.keller@intel.com, parav@nvidia.com, jiri@nvidia.com Subject: [PATCH net-next 2/2] net/ice: Remove unused enum Date: Tue, 30 Nov 2021 10:12:43 -0800 Message-Id: <20211130181243.3707618-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211130181243.3707618-1-anthony.l.nguyen@intel.com> References: <20211130181243.3707618-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Shiraz Saleem Remove ice_devlink_param_id enum as its not used. Suggested-by: Parav Pandit Signed-off-by: Shiraz Saleem Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_devlink.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.h b/drivers/net/ethernet/intel/ice/ice_devlink.h index faea757fcf5d..fe006d9946f8 100644 --- a/drivers/net/ethernet/intel/ice/ice_devlink.h +++ b/drivers/net/ethernet/intel/ice/ice_devlink.h @@ -4,10 +4,6 @@ #ifndef _ICE_DEVLINK_H_ #define _ICE_DEVLINK_H_ -enum ice_devlink_param_id { - ICE_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX, -}; - struct ice_pf *ice_allocate_pf(struct device *dev); void ice_devlink_register(struct ice_pf *pf);