From: Heiner Kallweit <hkallweit1@gmail.com>
To: Grygorii Strashko <grygorii.strashko@ti.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
Andrew Lunn <andrew@lunn.ch>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] mdio_bus: suppress err message for reset gpio EPROBE_DEFER
Date: Thu, 19 Nov 2020 22:11:48 +0100 [thread overview]
Message-ID: <1a59fbe1-6a5d-81a3-4a86-fa3b5dbfdf8e@gmail.com> (raw)
In-Reply-To: <20201119203446.20857-1-grygorii.strashko@ti.com>
Am 19.11.2020 um 21:34 schrieb Grygorii Strashko:
> The mdio_bus may have dependencies from GPIO controller and so got
> deferred. Now it will print error message every time -EPROBE_DEFER is
> returned which from:
> __mdiobus_register()
> |-devm_gpiod_get_optional()
> without actually identifying error code.
>
> "mdio_bus 4a101000.mdio: mii_bus 4a101000.mdio couldn't get reset GPIO"
>
> Hence, suppress error message for devm_gpiod_get_optional() returning
> -EPROBE_DEFER case by using dev_err_probe().
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> drivers/net/phy/mdio_bus.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 757e950fb745..83cd61c3dd01 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -546,10 +546,10 @@ int __mdiobus_register(struct mii_bus *bus, struct module *owner)
> /* de-assert bus level PHY GPIO reset */
> gpiod = devm_gpiod_get_optional(&bus->dev, "reset", GPIOD_OUT_LOW);
> if (IS_ERR(gpiod)) {
> - dev_err(&bus->dev, "mii_bus %s couldn't get reset GPIO\n",
> - bus->id);
> + err = dev_err_probe(&bus->dev, PTR_ERR(gpiod),
> + "mii_bus %s couldn't get reset GPIO\n", bus->id);
Doesn't checkpatch complain about line length > 80 here?
> device_del(&bus->dev);
> - return PTR_ERR(gpiod);
> + return err;
> } else if (gpiod) {
> bus->reset_gpiod = gpiod;
>
>
Last but not least the net or net-next patch annotation is missing.
I'd be fine with treating the change as an improvement (net-next).
Apart from that change looks good to me.
next prev parent reply other threads:[~2020-11-19 21:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-19 20:34 Grygorii Strashko
2020-11-19 21:11 ` Heiner Kallweit [this message]
2020-11-19 21:17 ` Grygorii Strashko
2020-11-19 21:23 ` Heiner Kallweit
2020-11-19 21:41 ` Andrew Lunn
2020-11-19 22:09 ` Heiner Kallweit
2020-11-20 5:21 ` Jakub Kicinski
2020-11-20 7:06 ` Joe Perches
2020-11-20 14:50 ` Andrew Lunn
2020-11-21 3:12 ` Jakub Kicinski
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=1a59fbe1-6a5d-81a3-4a86-fa3b5dbfdf8e@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome