Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Vladimir Oltean and committed by
David S. Miller
244f8a80 a3280efd

+1 -9
+1 -9
drivers/net/dsa/mt7530.c
··· 1717 1717 mtk_get_tag_protocol(struct dsa_switch *ds, int port, 1718 1718 enum dsa_tag_protocol mp) 1719 1719 { 1720 - struct mt7530_priv *priv = ds->priv; 1721 - 1722 - if (port != MT7530_CPU_PORT) { 1723 - dev_warn(priv->dev, 1724 - "port not matched with tagging CPU port\n"); 1725 - return DSA_TAG_PROTO_NONE; 1726 - } else { 1727 - return DSA_TAG_PROTO_MTK; 1728 - } 1720 + return DSA_TAG_PROTO_MTK; 1729 1721 } 1730 1722 1731 1723 #ifdef CONFIG_GPIOLIB