Thread (5 messages) flat view 5 messages, 4 authors, 2021-04-09

Re: [PATCH][next] mlxsw: spectrum_router: remove redundant initialization of variable force

From: Joe Perches <joe@perches.com>
Date: 2021-04-09 09:11:36
Also in: kernel-janitors, lkml

On Mon, 2021-03-29 at 09:04 +0300, Dan Carpenter wrote:
On Sat, Mar 27, 2021 at 10:33:34PM +0000, Colin King wrote:
quoted
From: Colin Ian King <redacted>

The variable force is being initialized with a value that is
never read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 6ccaa194733b..ff240e3c29f7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -5059,7 +5059,7 @@ mlxsw_sp_nexthop_obj_bucket_adj_update(struct mlxsw_sp *mlxsw_sp,
 {
 	u16 bucket_index = info->nh_res_bucket->bucket_index;
 	struct netlink_ext_ack *extack = info->extack;
-	bool force = info->nh_res_bucket->force;
+	bool force;
 	char ratr_pl_new[MLXSW_REG_RATR_LEN];
 	char ratr_pl[MLXSW_REG_RATR_LEN];
 	u32 adj_index;
Reverse Christmas tree.
Is still terrible style.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help