Skip to contentSkip to conversation

pinctrl: bcm: Use dev_err_probe()

PATCH In review Florian Fainelli 3 participants 6 messages Aug 8, 2023 – Aug 10, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover pinctrl: bcm: Use dev_err_probe()

These two drivers were giving "unable to add GPIO chip data" which was slightly concerning but did not have any functional impact.

Changes in v2:

- return from dev_err_probe() directly (Andy)

Florian Fainelli (2):
pinctrl: iproc-gpio: Silence probe deferral messages
pinctrl: nsp-gpio: Silence probe deferral messages

 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++----
 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c   | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#1 lore raw

PATCH v2 1/2 pinctrl: iproc-gpio: Silence probe deferral messages

We can have gpiochip_add_data() return -EPROBE_DEFER which will make us produce the "unable to add GPIO chip" message which is confusing. Use dev_err_probe() to silence probe deferral messages.

---
 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +2 -4
index cc3eb7409ab3..0e3f787b93ef 100644
@@ -891,10 +891,8 @@ static int iproc_gpio_probe(struct platform_device *pdev)
 	}
 
 	ret = gpiochip_add_data(gc, chip);
-	if (ret < 0) {
-		dev_err(dev, "unable to add GPIO chip\n");
-		return ret;
-	}
+	if (ret < 0)
+		return dev_err_probe(dev, ret, "unable to add GPIO chip\n");
 
 	if (!no_pinconf) {
 		ret = iproc_gpio_register_pinconf(chip);
Signature · 1 line
2.34.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw

Re: [PATCH 1/2 v2] pinctrl: iproc-gpio: Silence probe deferral messages

Quoted 5 lines · Florian Fainelli

We can have gpiochip_add_data() return -EPROBE_DEFER which will make us produce the "unable to add GPIO chip" message which is confusing. Use dev_err_probe() to silence probe deferral messages.

Patch applied.

Yours,
Linus Walleij

#3 lore raw

PATCH v2 2/2 pinctrl: nsp-gpio: Silence probe deferral messages

In reply to Florian Fainelli

We can have gpiochip_add_data() return -EPROBE_DEFER which will make us produce the "unable to add GPIO chip" message which is confusing. Use dev_err_probe() to silence probe deferral messages.

---
 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/pinctrl/bcm/pinctrl-nsp-gpio.c +2 -4
index 5045a7e57f1d..7fecd0a10cd1 100644
@@ -686,10 +686,8 @@ static int nsp_gpio_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_gpiochip_add_data(dev, gc, chip);
-	if (ret < 0) {
-		dev_err(dev, "unable to add GPIO chip\n");
-		return ret;
-	}
+	if (ret < 0)
+		return dev_err_probe(dev, ret, "unable to add GPIO chip\n");
 
 	ret = nsp_gpio_register_pinconf(chip);
 	if (ret) {
Signature · 1 line
2.34.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw

Re: [PATCH 2/2 v2] pinctrl: nsp-gpio: Silence probe deferral messages

Quoted 5 lines · Florian Fainelli

We can have gpiochip_add_data() return -EPROBE_DEFER which will make us produce the "unable to add GPIO chip" message which is confusing. Use dev_err_probe() to silence probe deferral messages.

Patch applied.

Yours,
Linus Walleij

Reviewed-by on the v2 series
#5 lore raw
In reply to Florian Fainelli
Quoted 6 lines · Florian Fainelli

These two drivers were giving "unable to add GPIO chip data" which was slightly concerning but did not have any functional impact.

Changes in v2:

- return from dev_err_probe() directly (Andy)

For the series,

Quoted 12 lines

Florian Fainelli (2):
pinctrl: iproc-gpio: Silence probe deferral messages
pinctrl: nsp-gpio: Silence probe deferral messages

 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 6 ++----
 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c   | 6 ++----
 2 files changed, 4 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1
Signature · 2 lines
Best regards,
Dhruva Gole <[email protected]>