[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241120094336.22f95926@fedora-2.home>
Date: Wed, 20 Nov 2024 09:43:36 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Simon Horman <horms@...nel.org>
Cc: davem@...emloft.net, Andrew Lunn <andrew@...n.ch>, Jakub Kicinski
<kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Russell King <linux@...linux.org.uk>, Christophe Leroy
<christophe.leroy@...roup.eu>, Heiner Kallweit <hkallweit1@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com, Herve Codina <herve.codina@...tlin.com>, Uwe
Kleine-König <u.kleine-koenig@...libre.com>,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH net-next v2 01/10] net: freescale: ucc_geth: Drop
support for the "interface" DT property
Hello Simon,
On Fri, 15 Nov 2024 12:19:14 +0000
Simon Horman <horms@...nel.org> wrote:
[...]
> > @@ -3627,18 +3588,17 @@ static int ucc_geth_probe(struct platform_device* ofdev)
> > /* Find the TBI PHY node. If it's not there, we don't support SGMII */
> > ug_info->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
> >
> > - /* get the phy interface type, or default to MII */
> > - prop = of_get_property(np, "phy-connection-type", NULL);
> > - if (!prop) {
> > - /* handle interface property present in old trees */
> > - prop = of_get_property(ug_info->phy_node, "interface", NULL);
> > - if (prop != NULL) {
> > - phy_interface = enet_to_phy_interface[*prop];
> > - max_speed = enet_to_speed[*prop];
> > - } else
> > - phy_interface = PHY_INTERFACE_MODE_MII;
> > - } else {
> > - phy_interface = to_phy_interface((const char *)prop);
> > + prop = of_get_property(ug_info->phy_node, "interface", NULL);
> > + if (prop) {
> > + dev_err(&ofdev->dev,
> > + "Device-tree property 'interface' is no longer supported. Please use 'phy-connection-type' instead.");
> > + goto err_put_tbi;
>
> Hi Maxime,
>
> This goto will result in err being returned by this function.
> But here err is 0. Should it be set to an error value instead?
>
> Flagged by Smatch.
arg yes you're right. I'll address this in the next iteration.
Thanks,
Maxime
Powered by blists - more mailing lists