[PATCH net-next 0/2][pull request] 100GbE Intel Wired LAN Driver Updates 2021-11-30

STALE1711d

5 messages, 3 authors, 2021-12-02 · open the first message on its own page

[PATCH net-next 0/2][pull request] 100GbE Intel Wired LAN Driver Updates 2021-11-30

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-11-30 18:30:35

This series contains updates to ice driver only.

Shiraz corrects assignment of boolean variable and removes an unused
enum.

The following are changes since commit 196073f9c44be0b4758ead11e51bc2875f98df29:
  net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE

Shiraz Saleem (2):
  net/ice: Fix boolean assignment
  net/ice: Remove unused enum

 drivers/net/ethernet/intel/ice/ice_devlink.c | 2 +-
 drivers/net/ethernet/intel/ice/ice_devlink.h | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

-- 
2.31.1

[PATCH net-next 1/2] net/ice: Fix boolean assignment

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-11-30 18:30:32

From: Shiraz Saleem <redacted>

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 <redacted>
Signed-off-by: Shiraz Saleem <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.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

[PATCH net-next 2/2] net/ice: Remove unused enum

From: Tony Nguyen <anthony.l.nguyen@intel.com>
Date: 2021-11-30 18:30:34

From: Shiraz Saleem <redacted>

Remove ice_devlink_param_id enum as its not used.

Suggested-by: Parav Pandit <redacted>
Signed-off-by: Shiraz Saleem <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 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);
-- 
2.31.1

Re: [PATCH net-next 0/2][pull request] 100GbE Intel Wired LAN Driver Updates 2021-11-30

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-01 14:50:14

Hello:

This series was applied to netdev/net-next.git (master)
by Tony Nguyen [off-list ref]:

On Tue, 30 Nov 2021 10:12:41 -0800 you wrote:
This series contains updates to ice driver only.

Shiraz corrects assignment of boolean variable and removes an unused
enum.

The following are changes since commit 196073f9c44be0b4758ead11e51bc2875f98df29:
  net: ixp4xx_hss: drop kfree for memory allocated with devm_kzalloc
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE

[...]
Here is the summary with links:
  - [net-next,1/2] net/ice: Fix boolean assignment
    https://git.kernel.org/netdev/net-next/c/7b62483f64dd
  - [net-next,2/2] net/ice: Remove unused enum
    https://git.kernel.org/netdev/net-next/c/244714da8d5d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Re: [PATCH net-next 1/2] net/ice: Fix boolean assignment

From: Joe Perches <joe@perches.com>
Date: 2021-12-02 17:49:05

On Tue, 2021-11-30 at 10:12 -0800, Tony Nguyen wrote:
From: Shiraz Saleem <redacted>

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.
This one seems fine, but another use of vbool in ice still exists

drivers/net/ethernet/intel/ice/ice_devlink.c:617:       value.vbool = test_bit(ICE_FLAG_RDMA_ENA, pf->flags) ? true : false;

Curiously, the vbool is defined in a union so it's possible
for the vbool value in the union to not just be 0 or 1.
quoted hunk
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c
[]
quoted hunk
@@ -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;
 }

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help