Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: DENG Qingfang <dqfext@gmail.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vivien Didelot <vivien.didelot@gmail.com>,
Sean Wang <sean.wang@mediatek.com>,
Landen Chao <Landen.Chao@mediatek.com>
Subject: Re: [PATCH net-next] net: dsa: mt7530: drop paranoid checks in .get_tag_protocol()
Date: Sat, 31 Jul 2021 10:54:23 +0800 [thread overview]
Message-ID: <20210731025424.639902-1-dqfext@gmail.com> (raw)
In-Reply-To: <20210730225714.1857050-1-vladimir.oltean@nxp.com>
On Sat, Jul 31, 2021 at 01:57:14AM +0300, Vladimir Oltean wrote:
> 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>
> ---
> drivers/net/dsa/mt7530.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
> index 69f21b71614c..b6e0b347947e 100644
> --- a/drivers/net/dsa/mt7530.c
> +++ b/drivers/net/dsa/mt7530.c
> @@ -1717,15 +1717,7 @@ static enum dsa_tag_protocol
> mtk_get_tag_protocol(struct dsa_switch *ds, int port,
> enum dsa_tag_protocol mp)
> {
> - struct mt7530_priv *priv = ds->priv;
> -
> - if (port != MT7530_CPU_PORT) {
> - dev_warn(priv->dev,
> - "port not matched with tagging CPU port\n");
> - return DSA_TAG_PROTO_NONE;
> - } else {
> - return DSA_TAG_PROTO_MTK;
> - }
> + return DSA_TAG_PROTO_MTK;
> }
>
> #ifdef CONFIG_GPIOLIB
> --
> 2.25.1
>
Acked-by: DENG Qingfang <dqfext@gmail.com>
next prev parent reply other threads:[~2021-07-31 2:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 22:57 Vladimir Oltean
2021-07-31 2:54 ` DENG Qingfang [this message]
2021-07-31 3:08 ` Florian Fainelli
2021-07-31 14:08 ` Vladimir Oltean
2021-08-02 14:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210731025424.639902-1-dqfext@gmail.com \
--to=dqfext@gmail.com \
--cc=Landen.Chao@mediatek.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sean.wang@mediatek.com \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
--subject='Re: [PATCH net-next] net: dsa: mt7530: drop paranoid checks in .get_tag_protocol()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).