Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: tegra: add OF node when logging OF parsing errors

These errors are not quite clear without also logging they device tree node
being parsed, especially when the pinmux node has lots of subnodes. Adding
the node name helps a lot in finding the node that triggers the error.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230926103938.334055-1-luca.ceresoli@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Luca Ceresoli and committed by
Linus Walleij
b50df2f5 1d4b7855

+4 -4
+4 -4
drivers/pinctrl/tegra/pinctrl-tegra.c
··· 121 121 /* EINVAL=missing, which is fine since it's optional */ 122 122 if (ret != -EINVAL) 123 123 dev_err(dev, 124 - "could not parse property nvidia,function\n"); 124 + "%pOF: could not parse property nvidia,function\n", np); 125 125 function = NULL; 126 126 } 127 127 ··· 135 135 goto exit; 136 136 /* EINVAL=missing, which is fine since it's optional */ 137 137 } else if (ret != -EINVAL) { 138 - dev_err(dev, "could not parse property %s\n", 139 - cfg_params[i].property); 138 + dev_err(dev, "%pOF: could not parse property %s\n", 139 + np, cfg_params[i].property); 140 140 } 141 141 } 142 142 ··· 147 147 reserve++; 148 148 ret = of_property_count_strings(np, "nvidia,pins"); 149 149 if (ret < 0) { 150 - dev_err(dev, "could not parse property nvidia,pins\n"); 150 + dev_err(dev, "%pOF: could not parse property nvidia,pins\n", np); 151 151 goto exit; 152 152 } 153 153 reserve *= ret;