* [PATCH] net: dsa: b53: remove redundant premature assignment to new_pvid
@ 2020-05-27 12:01 Colin King
2020-05-27 16:23 ` Florian Fainelli
2020-05-27 18:29 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2020-05-27 12:01 UTC (permalink / raw)
To: Florian Fainelli, Andrew Lunn, Vivien Didelot, David S . Miller,
Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Variable new_pvid is being assigned with a value that is never read,
the following if statement updates new_pvid with a new value in both
of the if paths. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/dsa/b53/b53_common.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index ceb8be653182..1df05841ab6b 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1325,7 +1325,6 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering)
u16 pvid, new_pvid;
b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port), &pvid);
- new_pvid = pvid;
if (!vlan_filtering) {
/* Filtering is currently enabled, use the default PVID since
* the bridge does not expect tagging anymore
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: b53: remove redundant premature assignment to new_pvid
2020-05-27 12:01 [PATCH] net: dsa: b53: remove redundant premature assignment to new_pvid Colin King
@ 2020-05-27 16:23 ` Florian Fainelli
2020-05-27 18:29 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-05-27 16:23 UTC (permalink / raw)
To: Colin King, Andrew Lunn, Vivien Didelot, David S . Miller,
Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
On 5/27/2020 5:01 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable new_pvid is being assigned with a value that is never read,
> the following if statement updates new_pvid with a new value in both
> of the if paths. The assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: dsa: b53: remove redundant premature assignment to new_pvid
2020-05-27 12:01 [PATCH] net: dsa: b53: remove redundant premature assignment to new_pvid Colin King
2020-05-27 16:23 ` Florian Fainelli
@ 2020-05-27 18:29 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-05-27 18:29 UTC (permalink / raw)
To: colin.king
Cc: f.fainelli, andrew, vivien.didelot, kuba, netdev,
kernel-janitors, linux-kernel
From: Colin King <colin.king@canonical.com>
Date: Wed, 27 May 2020 13:01:29 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Variable new_pvid is being assigned with a value that is never read,
> the following if statement updates new_pvid with a new value in both
> of the if paths. The assignment is redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-27 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 12:01 [PATCH] net: dsa: b53: remove redundant premature assignment to new_pvid Colin King
2020-05-27 16:23 ` Florian Fainelli
2020-05-27 18:29 ` 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).