[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211013041004.29805-1-dqfext@gmail.com>
Date: Wed, 13 Oct 2021 12:10:04 +0800
From: DENG Qingfang <dqfext@...il.com>
To: Ansuel Smith <ansuelsmth@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Russell King <linux@...linux.org.uk>,
John Crispin <john@...ozen.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [net-next PATCH v6 05/16] net: dsa: qca8k: add support for cpu port 6
On Wed, Oct 13, 2021 at 03:16:11AM +0200, Ansuel Smith wrote:
> @@ -1017,13 +1033,14 @@ static int
> qca8k_setup(struct dsa_switch *ds)
> {
> struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
> + u8 cpu_port;
> int ret, i;
> u32 mask;
>
> - /* Make sure that port 0 is the cpu port */
> - if (!dsa_is_cpu_port(ds, 0)) {
> - dev_err(priv->dev, "port 0 is not the CPU port");
> - return -EINVAL;
> + cpu_port = qca8k_find_cpu_port(ds);
> + if (cpu_port < 0) {
cpu_port should be of type int, otherwise this is always false.
> + dev_err(priv->dev, "No cpu port configured in both cpu port0 and port6");
> + return cpu_port;
> }
Powered by blists - more mailing lists