aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2022-12-07 09:57:47 +0100
committerRafał Miłecki <rafal@milecki.pl>2022-12-07 10:30:14 +0100
commit50d255d4a8e8a89ce4b593b3c6b5c4484798553b (patch)
tree2a408acd738a06a76e205526950eba69a6362080 /target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch
parent88a71fbe774b048457bfca3721098f6da0b167d8 (diff)
downloadupstream-50d255d4a8e8a89ce4b593b3c6b5c4484798553b.tar.gz
upstream-50d255d4a8e8a89ce4b593b3c6b5c4484798553b.tar.bz2
upstream-50d255d4a8e8a89ce4b593b3c6b5c4484798553b.zip
kernel: backport b53/bcm_sf2 changes from v5.8
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch')
-rw-r--r--target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch b/target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch
new file mode 100644
index 0000000000..1360aa4631
--- /dev/null
+++ b/target/linux/generic/backport-5.4/709-v5.8-0006-net-dsa-b53-remove-redundant-premature-assignment-to.patch
@@ -0,0 +1,28 @@
+From 9f01a71c5cbec10b851588457089d17c20dc5a40 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Wed, 27 May 2020 13:01:29 +0100
+Subject: [PATCH] net: dsa: b53: remove redundant premature assignment to
+ new_pvid
+
+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>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/dsa/b53/b53_common.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -1336,7 +1336,6 @@ int b53_vlan_filtering(struct dsa_switch
+ 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