From: Krzysztof Kozlowski <krzk@kernel.org>
To: Luiz Angelo Daros de Luca <luizluca@gmail.com>, netdev@vger.kernel.org
Cc: linus.walleij@linaro.org, alsi@bang-olufsen.dk, andrew@lunn.ch,
vivien.didelot@gmail.com, f.fainelli@gmail.com,
olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, robh+dt@kernel.org, krzk+dt@kernel.org,
arinc.unal@arinc9.com
Subject: Re: [RFC net-next 3/5] net: dsa: realtek: create realtek-common
Date: Sun, 12 Nov 2023 08:39:22 +0100 [thread overview]
Message-ID: <9bdbe85d-b45f-407c-8763-42439bc096e2@kernel.org> (raw)
In-Reply-To: <20231111215647.4966-4-luizluca@gmail.com>
On 11/11/2023 22:51, Luiz Angelo Daros de Luca wrote:
> ret = priv->ops->detect(priv);
> if (ret) {
> @@ -218,18 +149,12 @@ static int realtek_mdio_probe(struct mdio_device *mdiodev)
> return ret;
> }
>
> - priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
> - if (!priv->ds)
> - return -ENOMEM;
> -
> - priv->ds->dev = dev;
> priv->ds->num_ports = priv->num_ports;
> - priv->ds->priv = priv;
> - priv->ds->ops = var->ds_ops_mdio;
>
> ret = dsa_register_switch(priv->ds);
> if (ret) {
> - dev_err(priv->dev, "unable to register switch ret = %d\n", ret);
> + dev_err_probe(dev, ret, "unable to register switch ret = %pe\n",
> + ERR_PTR(ret));
This is some weird code. Why do you print ret twice? This was not
explained in the commit msg.
...
> - priv->ds->ops = var->ds_ops_smi;
> ret = dsa_register_switch(priv->ds);
> if (ret) {
> - dev_err_probe(dev, ret, "unable to register switch\n");
> + dev_err_probe(dev, ret, "unable to register switch ret = %pe\n",
> + ERR_PTR(ret));
Same problem.
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-11-12 7:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 21:51 [RFC net-next 0/5] refactor realtek switches and add reset controller Luiz Angelo Daros de Luca
2023-11-11 21:51 ` [RFC net-next 1/5] dt-bindings: net: dsa: realtek: reset-gpios is not required Luiz Angelo Daros de Luca
2023-11-12 7:37 ` Krzysztof Kozlowski
2023-11-13 20:30 ` Luiz Angelo Daros de Luca
2023-11-13 8:31 ` Linus Walleij
2023-11-14 12:23 ` Alvin Šipraga
2023-11-11 21:51 ` [RFC net-next 2/5] dt-bindings: net: dsa: realtek: add reset controller Luiz Angelo Daros de Luca
2023-11-13 8:31 ` Linus Walleij
2023-11-14 12:23 ` Alvin Šipraga
2023-11-16 16:25 ` Rob Herring
2023-11-11 21:51 ` [RFC net-next 3/5] net: dsa: realtek: create realtek-common Luiz Angelo Daros de Luca
2023-11-12 7:39 ` Krzysztof Kozlowski [this message]
2023-11-13 8:35 ` Linus Walleij
2023-11-13 20:41 ` Luiz Angelo Daros de Luca
2023-11-13 22:01 ` Alvin Šipraga
2023-11-14 11:43 ` Alvin Šipraga
2023-11-17 23:04 ` Luiz Angelo Daros de Luca
2023-11-11 21:51 ` [RFC net-next 4/5] net: dsa: realtek: load switch variants on demand Luiz Angelo Daros de Luca
2023-11-12 3:54 ` kernel test robot
2023-11-14 12:17 ` Alvin Šipraga
2023-11-17 21:14 ` Luiz Angelo Daros de Luca
2023-11-11 21:51 ` [RFC net-next 5/5] net: dsa: realtek: support reset controller Luiz Angelo Daros de Luca
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=9bdbe85d-b45f-407c-8763-42439bc096e2@kernel.org \
--to=krzk@kernel.org \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@gmail.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.