]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mt7530: drop paranoid checks in .get_tag_protocol()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 30 Jul 2021 22:57:14 +0000 (01:57 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Aug 2021 14:06:55 +0000 (15:06 +0100)
commit379c5439499c71529356917c1e5306d972e20afb
tree6dd3fc9bb2155556ce4be2ff178ceb3a00fcb8d0
parent230af7ef01307e1ff854901d31f93a9999e42e99
net: dsa: mt7530: drop paranoid checks in .get_tag_protocol()

It is desirable to reduce the surface of DSA_TAG_PROTO_NONE as much as
we can, because we now have options for switches without hardware
support for DSA tagging, and the occurrence in the mt7530 driver is in
fact quite gratuitout and easy to remove. Since ds->ops->get_tag_protocol()
is only called for CPU ports, the checks for a CPU port in
mtk_get_tag_protocol() are redundant and can be removed.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: DENG Qingfang <dqfext@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c