From: Vladimir Oltean Date: Wed, 15 Oct 2025 22:32:30 +0000 (+0100) Subject: net: dsa: lantiq_gswip: remove duplicate assignment to vlan_mapping.val[0] X-Git-Tag: v6.19-rc1~170^2~355^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f5c71e44413ac1c8dcc162cd4769645eff80590;p=thirdparty%2Fkernel%2Flinux.git net: dsa: lantiq_gswip: remove duplicate assignment to vlan_mapping.val[0] When idx == -1 in gswip_vlan_add(), we set vlan_mapping.val[0] = vid, even though we do the exact same thing again outside the if/else block. Remove the duplicate assignment. Signed-off-by: Vladimir Oltean Signed-off-by: Daniel Golle Link: https://patch.msgid.link/039ecb48e038cea856a9a6230ad1543db2bc382d.1760566491.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c index 9526317443a1b..e41d67ea89c52 100644 --- a/drivers/net/dsa/lantiq/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq/lantiq_gswip.c @@ -848,8 +848,6 @@ static int gswip_vlan_add_aware(struct gswip_priv *priv, vlan_mapping.index = idx; vlan_mapping.table = GSWIP_TABLE_VLAN_MAPPING; - /* VLAN ID byte, maps to the VLAN ID of vlan active table */ - vlan_mapping.val[0] = vid; } else { /* Read the existing VLAN mapping entry from the switch */ vlan_mapping.index = idx; @@ -862,6 +860,7 @@ static int gswip_vlan_add_aware(struct gswip_priv *priv, } } + /* VLAN ID byte, maps to the VLAN ID of vlan active table */ vlan_mapping.val[0] = vid; /* Update the VLAN mapping entry and write it to the switch */ vlan_mapping.val[1] |= cpu_ports;