2024-06-06 08:57:32

by Martin Schiller

[permalink] [raw]
Subject: [PATCH net-next 04/13] net: dsa: lantiq_gswip: Don't manually call gswip_port_enable()

From: Martin Blumenstingl <[email protected]>

We don't need to manually call gswip_port_enable() from within
gswip_setup() for the CPU port. DSA does this automatically for us.

Signed-off-by: Martin Blumenstingl <[email protected]>
---
drivers/net/dsa/lantiq_gswip.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index fcb5929c9c88..3fd5599fca52 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -898,8 +898,6 @@ static int gswip_setup(struct dsa_switch *ds)

ds->mtu_enforcement_ingress = true;

- gswip_port_enable(ds, cpu_port, NULL);
-
ds->configure_vlan_while_not_filtering = false;

return 0;
--
2.39.2



2024-06-07 11:11:32

by Vladimir Oltean

[permalink] [raw]
Subject: Re: [PATCH net-next 04/13] net: dsa: lantiq_gswip: Don't manually call gswip_port_enable()

On Thu, Jun 06, 2024 at 10:52:25AM +0200, Martin Schiller wrote:
> From: Martin Blumenstingl <[email protected]>
>
> We don't need to manually call gswip_port_enable() from within
> gswip_setup() for the CPU port. DSA does this automatically for us.
>
> Signed-off-by: Martin Blumenstingl <[email protected]>
> ---

Not to mention the first thing in gswip_port_enable(), which is:

if (!dsa_is_user_port(ds, port))
return 0;

So the call is dead code anyway.

2024-06-07 12:12:50

by Martin Schiller

[permalink] [raw]
Subject: Re: [PATCH net-next 04/13] net: dsa: lantiq_gswip: Don't manually call gswip_port_enable()

On 2024-06-07 13:11, Vladimir Oltean wrote:
> On Thu, Jun 06, 2024 at 10:52:25AM +0200, Martin Schiller wrote:
>> From: Martin Blumenstingl <[email protected]>
>>
>> We don't need to manually call gswip_port_enable() from within
>> gswip_setup() for the CPU port. DSA does this automatically for us.
>>
>> Signed-off-by: Martin Blumenstingl
>> <[email protected]>
>> ---
>
> Not to mention the first thing in gswip_port_enable(), which is:
>
> if (!dsa_is_user_port(ds, port))
> return 0;
>
> So the call is dead code anyway.

As you will have noticed, this code will be brought back to life in the
next
patch.