On 2020/11/30 16:06, Serge Semin wrote:
Damien,
Just a tiny nitpick below.
On Mon, Nov 30, 2020 at 03:13:45AM +0000, Damien Le Moal wrote:
quoted
[...]
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 2a9046c0fb16..4a801e83919b 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -617,8 +617,10 @@ static int dwapb_get_reset(struct dwapb_gpio *gpio)
gpio->rst = devm_reset_control_get_optional_shared(gpio->dev, NULL);
quoted
if (IS_ERR(gpio->rst)) {
- dev_err(gpio->dev, "Cannot get reset descriptor\n");
- return PTR_ERR(gpio->rst);
+ err = PTR_ERR(gpio->rst);
+ if (err != -EPROBE_DEFER)
+ dev_err(gpio->dev, "Cannot get reset descriptor\n");
+ return err;
}
There is a dedicated method to generically handle the PROBE_DEFER
error returned by functions like get(resource): dev_err_probe().
So here you'd just need to do:
- if (IS_ERR(gpio->rst)) {
- dev_err(gpio->dev, "Cannot get reset descriptor\n");
- return PTR_ERR(gpio->rst);
- }
+ if (IS_ERR(gpio->rst))
+ return dev_err_probe(gpio->dev, PTR_ERR(gpio->rst),
+ "Cannot get reset descriptor\n");
Great to know. Thank you for the hint.
Will send a patch.
-Sergey
quoted
and all drivers can now use builtin_platform_driver() declaration with a clean
boot log. If you are OK with the above patch, I will send it.
Thanks !
quoted
Yours,
Linus Walleij
--
Damien Le Moal
Western Digital
--
Damien Le Moal
Western Digital Research