[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cabad89e-23cc-18b3-8306-e5ef1ee4bfa6@ti.com>
Date: Thu, 19 Nov 2020 23:17:09 +0200
From: Grygorii Strashko <grygorii.strashko@...com>
To: Heiner Kallweit <hkallweit1@...il.com>,
"David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>, Andrew Lunn <andrew@...n.ch>
CC: <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] mdio_bus: suppress err message for reset gpio
EPROBE_DEFER
On 19/11/2020 23:11, Heiner Kallweit wrote:
> 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@...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?
:)
commit bdc48fa11e46f867ea4d75fa59ee87a7f48be144
Author: Joe Perches <joe@...ches.com>
Date: Fri May 29 16:12:21 2020 -0700
checkpatch/coding-style: deprecate 80-column warning
>
>> 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.
>
--
Best regards,
grygorii
Powered by blists - more mailing lists