Skip to content

Commit

Permalink
net: dsa: felix: remove ocelot->npi assignment from felix_8021q_cpu_p…
Browse files Browse the repository at this point in the history
…ort_init

This assignment is redundant, since ocelot->npi has already been set to
-1 by felix_npi_port_deinit(). Call path:

felix_change_tag_protocol
-> felix_del_tag_protocol(DSA_TAG_PROTO_OCELOT)
   -> felix_teardown_tag_npi
      -> felix_npi_port_deinit
-> felix_set_tag_protocol(DSA_TAG_PROTO_OCELOT_8021Q)
   -> felix_setup_tag_8021q
      -> felix_8021q_cpu_port_init

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed Mar 4, 2022
1 parent c3cde44 commit 28c1305
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/dsa/ocelot/felix.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ static void felix_8021q_cpu_port_init(struct ocelot *ocelot, int port)
mutex_lock(&ocelot->fwd_domain_lock);

ocelot_port_set_dsa_8021q_cpu(ocelot, port);
ocelot->npi = -1;

/* Overwrite PGID_CPU with the non-tagging port */
ocelot_write_rix(ocelot, BIT(port), ANA_PGID_PGID, PGID_CPU);
Expand Down

0 comments on commit 28c1305

Please sign in to comment.