[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211130181243.3707618-2-anthony.l.nguyen@intel.com>
Date: Tue, 30 Nov 2021 10:12:42 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org
Cc: Shiraz Saleem <shiraz.saleem@...el.com>, netdev@...r.kernel.org,
anthony.l.nguyen@...el.com, linux-rdma@...r.kernel.org,
mustafa.ismail@...el.com, jacob.e.keller@...el.com,
parav@...dia.com, jiri@...dia.com
Subject: [PATCH net-next 1/2] net/ice: Fix boolean assignment
From: Shiraz Saleem <shiraz.saleem@...el.com>
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 <parav@...dia.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
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;
}
--
2.31.1
Powered by blists - more mailing lists