Skip to contentSkip to conversation

pinctrl: pinmux: Suppress error message for -EPROBE_DEFER

PATCH In review Andre Przywara 2 participants 2 messages Mar 5, 2024

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

PATCH 1/1 pinctrl: pinmux: Suppress error message for -EPROBE_DEFER

EPROBE_DEFER error returns are not really critical, since they cancel the probe process, but the kernel will return later and retry. However, depending on the probe order, this might issue quite some verbatim and scary, though pointless messages:

[    2.388731] 300b000.pinctrl: pin-224 (5000000.serial) status -517
[    2.397321] 300b000.pinctrl: could not request pin 224 (PH0) from group PH0  on device 300b000.pinctrl

Replace dev_err() with dev_err_probe(), which not only drops the priority of the message from error to debug, but also puts some text into debugfs' devices_deferred file, for later reference.

---
 drivers/pinctrl/pinmux.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/pinctrl/pinmux.c +3 -3
index 23d2da0b99b92..a6d2fd1658128 100644
@@ -188,8 +188,8 @@ static int pin_request(struct pinctrl_dev *pctldev,
 	}
 out:
 	if (status)
-		dev_err(pctldev->dev, "pin-%d (%s) status %d\n",
-			pin, owner, status);
+		dev_err_probe(pctldev->dev, status, "pin-%d (%s)\n",
+			      pin, owner);
 
 	return status;
 }
@@ -441,7 +441,7 @@ int pinmux_enable_setting(const struct pinctrl_setting *setting)
 			pname = desc ? desc->name : "non-existing";
 			gname = pctlops->get_group_name(pctldev,
 						setting->data.mux.group);
-			dev_err(pctldev->dev,
+			dev_err_probe(pctldev->dev, ret,
 				"could not request pin %d (%s) from group %s "
 				" on device %s\n",
 				pins[i], pname, gname,
Signature · 1 line
2.25.1
#1 lore raw
Quoted 5 lines · Andre Przywara

EPROBE_DEFER error returns are not really critical, since they cancel the probe process, but the kernel will return later and retry. However, depending on the probe order, this might issue quite some verbatim and scary, though pointless messages:

Quoted 8 lines
[    2.388731] 300b000.pinctrl: pin-224 (5000000.serial) status -517
[    2.397321] 300b000.pinctrl: could not request pin 224 (PH0) from group PH0  on device 300b000.pinctrl

Replace dev_err() with dev_err_probe(), which not only drops the priority of the message from error to debug, but also puts some text into debugfs' devices_deferred file, for later reference.

That does cut a lot of noise.

Patch applied!

Yours,
Linus Walleij