* [PATCH][V2][net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev
@ 2020-05-27 8:15 Colin King
2020-05-27 9:00 ` Ido Schimmel
2020-05-27 18:23 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-05-27 8:15 UTC (permalink / raw)
To: Jiri Pirko, Ido Schimmel, David S . Miller, Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer br_dev is being initialized with a value that is never read
and is being updated with a new value later on. The initialization
is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
V2: remove stray blank line
---
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 71aee4914619..c425b78c6093 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -7572,7 +7572,7 @@ static struct mlxsw_sp_fid *
mlxsw_sp_rif_vlan_fid_get(struct mlxsw_sp_rif *rif,
struct netlink_ext_ack *extack)
{
- struct net_device *br_dev = rif->dev;
+ struct net_device *br_dev;
u16 vid;
int err;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH][V2][net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev
2020-05-27 8:15 [PATCH][V2][net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev Colin King
@ 2020-05-27 9:00 ` Ido Schimmel
2020-05-27 18:23 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Ido Schimmel @ 2020-05-27 9:00 UTC (permalink / raw)
To: Colin King
Cc: Jiri Pirko, Ido Schimmel, David S . Miller, Jakub Kicinski,
netdev, kernel-janitors, linux-kernel
On Wed, May 27, 2020 at 09:15:55AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer br_dev is being initialized with a value that is never read
> and is being updated with a new value later on. The initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][V2][net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev
2020-05-27 8:15 [PATCH][V2][net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev Colin King
2020-05-27 9:00 ` Ido Schimmel
@ 2020-05-27 18:23 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-05-27 18:23 UTC (permalink / raw)
To: colin.king; +Cc: jiri, idosch, kuba, netdev, kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Wed, 27 May 2020 09:15:55 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer br_dev is being initialized with a value that is never read
> and is being updated with a new value later on. The initialization
> is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-27 18:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 8:15 [PATCH][V2][net-next] mlxsw: spectrum_router: remove redundant initialization of pointer br_dev Colin King
2020-05-27 9:00 ` Ido Schimmel
2020-05-27 18:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).