Message ID | 20240322073725.3338266-1-peng.fan@oss.nxp.com |
---|---|
State | New |
Headers | show |
Series | [V3] gpiolib: use dev_err() when gpiod_configure_flags failed | expand |
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
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.
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.
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); }