drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
From: Peng Fan <peng.fan@nxp.com>
When gpio-ranges property was missed to be added in the gpio node,
using dev_err() to show an error message will helping to locate issues
easier.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
V3:
Move gpiod_put before dev_err per Andy Shevchenko
V2:
Update commit log
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index ce94e37bcbee..b988704f5d63 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -4233,8 +4233,8 @@ struct gpio_desc *gpiod_find_and_request(struct device *consumer,
ret = gpiod_configure_flags(desc, con_id, lookupflags, flags);
if (ret < 0) {
- dev_dbg(consumer, "setup of GPIO %s failed\n", con_id);
gpiod_put(desc);
+ dev_err(consumer, "setup of GPIO %s failed: %d\n", con_id, ret);
return ERR_PTR(ret);
}
--
2.37.1
On Fri, Mar 22, 2024 at 9:29 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > > From: Peng Fan <peng.fan@nxp.com> > > When gpio-ranges property was missed to be added in the gpio node, > using dev_err() to show an error message will helping to locate issues > easier. Bart, are you aware that this will add yet another possibility of scary '(null)' in the error level, which is much likely visible to the end users? I propose to apply my fix first to avoid this happening. 20240320165930.1182653-1-andriy.shevchenko@linux.intel.com -- With Best Regards, Andy Shevchenko
On Fri, Mar 22, 2024 at 4:59 PM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > On Fri, Mar 22, 2024 at 9:29 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > > > > From: Peng Fan <peng.fan@nxp.com> > > > > When gpio-ranges property was missed to be added in the gpio node, > > using dev_err() to show an error message will helping to locate issues > > easier. > > Bart, are you aware that this will add yet another possibility of > scary '(null)' in the error level, which is much likely visible to the > end users? > > I propose to apply my fix first to avoid this happening. > 20240320165930.1182653-1-andriy.shevchenko@linux.intel.com > I think you meant the v2[1]? And sure, I will pick it up shortly. Bart [1] https://lore.kernel.org/lkml/20240320165930.1182653-1-andriy.shevchenko@linux.intel.com/T/
On Mon, Mar 25, 2024 at 04:48:27PM +0100, Bartosz Golaszewski wrote: > On Fri, Mar 22, 2024 at 4:59 PM Andy Shevchenko > <andy.shevchenko@gmail.com> wrote: > > On Fri, Mar 22, 2024 at 9:29 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: ... > > Bart, are you aware that this will add yet another possibility of > > scary '(null)' in the error level, which is much likely visible to the > > end users? > > > > I propose to apply my fix first to avoid this happening. > > 20240320165930.1182653-1-andriy.shevchenko@linux.intel.com > > I think you meant the v2[1]? Yes! > And sure, I will pick it up shortly. Thank you! > [1] https://lore.kernel.org/lkml/20240320165930.1182653-1-andriy.shevchenko@linux.intel.com/T/ I can update this patch (rebase it on top) if needed to make less burden on the author's shoulders. Just tell me. -- With Best Regards, Andy Shevchenko
On Mon, Mar 25, 2024 at 5:00 PM Andy Shevchenko <andy.shevchenko@gmail.com> wrote: > > On Mon, Mar 25, 2024 at 04:48:27PM +0100, Bartosz Golaszewski wrote: > > On Fri, Mar 22, 2024 at 4:59 PM Andy Shevchenko > > <andy.shevchenko@gmail.com> wrote: > > > On Fri, Mar 22, 2024 at 9:29 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: > > ... > > > > Bart, are you aware that this will add yet another possibility of > > > scary '(null)' in the error level, which is much likely visible to the > > > end users? > > > > > > I propose to apply my fix first to avoid this happening. > > > 20240320165930.1182653-1-andriy.shevchenko@linux.intel.com > > > > I think you meant the v2[1]? > > Yes! > > > And sure, I will pick it up shortly. > > Thank you! > > > [1] https://lore.kernel.org/lkml/20240320165930.1182653-1-andriy.shevchenko@linux.intel.com/T/ > > I can update this patch (rebase it on top) if needed to make less burden on > the author's shoulders. Just tell me. > Sure, if you can resend both yours and this one then even better. Bart > -- > With Best Regards, > Andy Shevchenko > >
On Mon, Mar 25, 2024 at 6:24 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote: > On Mon, Mar 25, 2024 at 5:00 PM Andy Shevchenko > <andy.shevchenko@gmail.com> wrote: > > On Mon, Mar 25, 2024 at 04:48:27PM +0100, Bartosz Golaszewski wrote: > > > On Fri, Mar 22, 2024 at 4:59 PM Andy Shevchenko > > > <andy.shevchenko@gmail.com> wrote: > > > > On Fri, Mar 22, 2024 at 9:29 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote: ... > > > > Bart, are you aware that this will add yet another possibility of > > > > scary '(null)' in the error level, which is much likely visible to the > > > > end users? > > > > > > > > I propose to apply my fix first to avoid this happening. > > > > 20240320165930.1182653-1-andriy.shevchenko@linux.intel.com > > > > > > I think you meant the v2[1]? > > > > Yes! > > > > > And sure, I will pick it up shortly. > > > > Thank you! > > > > > [1] https://lore.kernel.org/lkml/20240320165930.1182653-1-andriy.shevchenko@linux.intel.com/T/ > > > > I can update this patch (rebase it on top) if needed to make less burden on > > the author's shoulders. Just tell me. > > Sure, if you can resend both yours and this one then even better. Just sent both as v4. -- With Best Regards, Andy Shevchenko
© 2016 - 2026 Red Hat, Inc.