]> git.ipfire.org Git - thirdparty/openwrt.git/blob
4e297715c161f463a72c1541f2cc32f4159bae81
[thirdparty/openwrt.git] /
1 From b068706b7831ccf7c7f1a56a65862fbcc28d061f Mon Sep 17 00:00:00 2001
2 From: Martin Schiller <ms@dev.tdt.de>
3 Date: Tue, 11 Jun 2024 15:54:32 +0200
4 Subject: net: dsa: lantiq_gswip: Remove dead code from
5 gswip_add_single_port_br()
6
7 The port validation in gswip_add_single_port_br() is superfluous and
8 can be omitted.
9
10 Suggested-by: Vladimir Oltean <olteanv@gmail.com>
11 Signed-off-by: Martin Schiller <ms@dev.tdt.de>
12 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
13 Link: https://lore.kernel.org/r/20240611135434.3180973-11-ms@dev.tdt.de
14 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
15 ---
16 drivers/net/dsa/lantiq_gswip.c | 6 ------
17 1 file changed, 6 deletions(-)
18
19 --- a/drivers/net/dsa/lantiq_gswip.c
20 +++ b/drivers/net/dsa/lantiq_gswip.c
21 @@ -648,14 +648,8 @@ static int gswip_add_single_port_br(stru
22 struct gswip_pce_table_entry vlan_active = {0,};
23 struct gswip_pce_table_entry vlan_mapping = {0,};
24 unsigned int cpu_port = priv->hw_info->cpu_port;
25 - unsigned int max_ports = priv->hw_info->max_ports;
26 int err;
27
28 - if (port >= max_ports) {
29 - dev_err(priv->dev, "single port for %i supported\n", port);
30 - return -EIO;
31 - }
32 -
33 vlan_active.index = port + 1;
34 vlan_active.table = GSWIP_TABLE_ACTIVE_VLAN;
35 vlan_active.key[0] = 0; /* vid */