From: Simon Horman <horms@kernel.org>
To: Romain Gantois <romain.gantois@bootlin.com>
Cc: davem@davemloft.net, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Luka Perkov <luka.perkov@sartura.hr>,
Robert Marko <robert.marko@sartura.hr>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Subject: Re: [PATCH net-next v3 3/8] net: qualcomm: ipqess: introduce the Qualcomm IPQESS driver
Date: Wed, 15 Nov 2023 18:11:03 +0000 [thread overview]
Message-ID: <20231115181103.GX74656@kernel.org> (raw)
In-Reply-To: <20231114105600.1012056-4-romain.gantois@bootlin.com>
On Tue, Nov 14, 2023 at 11:55:53AM +0100, Romain Gantois wrote:
> The Qualcomm IPQ4019 Ethernet Switch Subsystem for the IPQ4019 chip
> includes an internal Ethernet switch based on the QCA8K IP.
>
> The CPU-to-switch port data plane depends on the IPQESS EDMA Controller,
> a simple 1G Ethernet controller. It is connected to the switch through an
> internal link, and doesn't expose directly any external interface.
>
> The EDMA controller has 16 RX and TX queues, with a very basic RSS fanout
> configured at init time.
>
> Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Hi Romain,
some minor feedback from my side.
> diff --git a/drivers/net/ethernet/qualcomm/ipqess/ipqess_switch.c b/drivers/net/ethernet/qualcomm/ipqess/ipqess_switch.c
...
> +static int ipqess_switch_probe(struct platform_device *pdev)
> +{
...
> + for_each_available_child_of_node(ports, port_np) {
> + ret = ipqess_port_register(sw, port_np);
> + if (ret) {
> + pr_err("Failed to register ipqess port! error %d\n", ret);
Coccinelle warns that a call to of_node_put() is needed here.
> + goto out_ports;
> + }
> + }
...
> +static int
> +ipqess_switch_remove(struct platform_device *pdev)
> +{
> + struct ipqess_switch *sw = platform_get_drvdata(pdev);
> + struct qca8k_priv *priv = sw->priv;
Here sw is dereferenced...
> + struct ipqess_port *port = NULL;
> + int i;
> +
> + if (!sw)
> + return 0;
... but here the code guards against sw being NULL.
This seems inconsistent.
As flagged by Smatch.
...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Romain Gantois <romain.gantois@bootlin.com>
Cc: davem@davemloft.net, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, thomas.petazzoni@bootlin.com,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Luka Perkov <luka.perkov@sartura.hr>,
Robert Marko <robert.marko@sartura.hr>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Subject: Re: [PATCH net-next v3 3/8] net: qualcomm: ipqess: introduce the Qualcomm IPQESS driver
Date: Wed, 15 Nov 2023 18:11:03 +0000 [thread overview]
Message-ID: <20231115181103.GX74656@kernel.org> (raw)
In-Reply-To: <20231114105600.1012056-4-romain.gantois@bootlin.com>
On Tue, Nov 14, 2023 at 11:55:53AM +0100, Romain Gantois wrote:
> The Qualcomm IPQ4019 Ethernet Switch Subsystem for the IPQ4019 chip
> includes an internal Ethernet switch based on the QCA8K IP.
>
> The CPU-to-switch port data plane depends on the IPQESS EDMA Controller,
> a simple 1G Ethernet controller. It is connected to the switch through an
> internal link, and doesn't expose directly any external interface.
>
> The EDMA controller has 16 RX and TX queues, with a very basic RSS fanout
> configured at init time.
>
> Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Hi Romain,
some minor feedback from my side.
> diff --git a/drivers/net/ethernet/qualcomm/ipqess/ipqess_switch.c b/drivers/net/ethernet/qualcomm/ipqess/ipqess_switch.c
...
> +static int ipqess_switch_probe(struct platform_device *pdev)
> +{
...
> + for_each_available_child_of_node(ports, port_np) {
> + ret = ipqess_port_register(sw, port_np);
> + if (ret) {
> + pr_err("Failed to register ipqess port! error %d\n", ret);
Coccinelle warns that a call to of_node_put() is needed here.
> + goto out_ports;
> + }
> + }
...
> +static int
> +ipqess_switch_remove(struct platform_device *pdev)
> +{
> + struct ipqess_switch *sw = platform_get_drvdata(pdev);
> + struct qca8k_priv *priv = sw->priv;
Here sw is dereferenced...
> + struct ipqess_port *port = NULL;
> + int i;
> +
> + if (!sw)
> + return 0;
... but here the code guards against sw being NULL.
This seems inconsistent.
As flagged by Smatch.
...
next prev parent reply other threads:[~2023-11-15 18:11 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 10:55 [PATCH net-next v3 0/8] net: qualcomm: ipqess: introduce Qualcomm IPQESS driver Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-14 10:55 ` [PATCH net-next v3 1/8] dt-bindings: net: Introduce the Qualcomm IPQESS Ethernet switch Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-16 12:22 ` Krzysztof Kozlowski
2023-11-16 12:22 ` Krzysztof Kozlowski
2023-11-14 10:55 ` [PATCH net-next v3 2/8] net: dsa: qca8k: Make the QCA8K hardware library available globally Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-14 18:15 ` Andrew Lunn
2023-11-14 18:15 ` Andrew Lunn
2023-11-14 10:55 ` [PATCH net-next v3 3/8] net: qualcomm: ipqess: introduce the Qualcomm IPQESS driver Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-14 19:10 ` Andrew Lunn
2023-11-14 19:10 ` Andrew Lunn
2023-11-15 14:24 ` Romain Gantois
2023-11-15 14:24 ` Romain Gantois
2023-11-15 12:55 ` Wojciech Drewek
2023-11-15 12:55 ` Wojciech Drewek
2023-11-15 15:07 ` Romain Gantois
2023-11-15 15:07 ` Romain Gantois
2023-11-16 14:39 ` Vladimir Oltean
2023-11-16 14:39 ` Vladimir Oltean
2023-11-15 18:11 ` Simon Horman [this message]
2023-11-15 18:11 ` Simon Horman
2023-11-16 16:08 ` kernel test robot
2023-11-16 16:08 ` kernel test robot
2023-11-16 21:56 ` Vladimir Oltean
2023-11-16 21:56 ` Vladimir Oltean
2023-11-17 0:28 ` kernel test robot
2023-11-17 0:28 ` kernel test robot
2023-11-14 10:55 ` [PATCH net-next v3 4/8] net: qualcomm: ipqess: Add Ethtool ops to IPQESS port netdevices Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-15 13:07 ` Wojciech Drewek
2023-11-15 13:07 ` Wojciech Drewek
2023-11-15 18:18 ` Simon Horman
2023-11-15 18:18 ` Simon Horman
2023-11-21 12:18 ` kernel test robot
2023-11-21 12:18 ` kernel test robot
2023-11-14 10:55 ` [PATCH net-next v3 5/8] net: qualcomm: ipqess: add bridge offloading features to the IPQESS driver Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-15 11:56 ` kernel test robot
2023-11-15 11:56 ` kernel test robot
2023-11-16 7:04 ` kernel test robot
2023-11-16 7:04 ` kernel test robot
2023-11-16 13:23 ` Wojciech Drewek
2023-11-16 13:23 ` Wojciech Drewek
2023-11-17 2:07 ` kernel test robot
2023-11-17 2:07 ` kernel test robot
2023-11-21 14:04 ` kernel test robot
2023-11-21 14:04 ` kernel test robot
2023-12-04 16:26 ` kernel test robot
2023-12-04 16:26 ` kernel test robot
2023-12-07 19:06 ` kernel test robot
2023-12-07 19:06 ` kernel test robot
2023-12-11 20:16 ` kernel test robot
2023-12-11 20:16 ` kernel test robot
2023-12-15 18:39 ` kernel test robot
2023-12-15 18:39 ` kernel test robot
2023-11-14 10:55 ` [PATCH net-next v3 6/8] net: phy: add calibration callbacks to phy_driver Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-14 19:14 ` Andrew Lunn
2023-11-14 19:14 ` Andrew Lunn
2023-11-15 15:31 ` Romain Gantois
2023-11-15 15:31 ` Romain Gantois
2023-11-15 16:12 ` Andrew Lunn
2023-11-15 16:12 ` Andrew Lunn
2023-11-14 19:20 ` Andrew Lunn
2023-11-14 19:20 ` Andrew Lunn
2023-11-14 10:55 ` [PATCH net-next v3 7/8] net: qualcomm: ipqess: add a PSGMII calibration procedure to the IPQESS driver Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-14 10:55 ` [PATCH net-next v3 8/8] ARM: dts: qcom: ipq4019: Add description for the IPQ4019 ESS EDMA and switch Romain Gantois
2023-11-14 10:55 ` Romain Gantois
2023-11-14 18:12 ` [PATCH net-next v3 0/8] net: qualcomm: ipqess: introduce Qualcomm IPQESS driver Andrew Lunn
2023-11-14 18:12 ` Andrew Lunn
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=20231115181103.GX74656@kernel.org \
--to=horms@kernel.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=luka.perkov@sartura.hr \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@kernel.org \
--cc=romain.gantois@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vladimir.oltean@nxp.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.