* [PATCH] gpiolib: don't bother warning when failing to get gpios
@ 2013-11-29 9:16 Heikki Krogerus
2013-11-29 9:37 ` Alexandre Courbot
0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2013-11-29 9:16 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio
It's the drivers responsibility to react on failure to get
the gpio descriptors and not the frameworks. Since there are
some common peripherals that may or may not have certain
pins connected to gpio lines, depending on the platform,
printing the warning there may end up generating useless bug
reports.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
drivers/gpio/gpiolib.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 4e10b10..2f0305e 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2434,10 +2434,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
desc = gpiod_find(dev, con_id, idx, &flags);
}
- if (IS_ERR(desc)) {
- dev_warn(dev, "lookup for GPIO %s failed\n", con_id);
+ if (IS_ERR(desc))
return desc;
- }
status = gpiod_request(desc, con_id);
--
1.8.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpiolib: don't bother warning when failing to get gpios
2013-11-29 9:16 [PATCH] gpiolib: don't bother warning when failing to get gpios Heikki Krogerus
@ 2013-11-29 9:37 ` Alexandre Courbot
2013-11-29 11:08 ` Heikki Krogerus
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Courbot @ 2013-11-29 9:37 UTC (permalink / raw)
To: Heikki Krogerus; +Cc: Linus Walleij, linux-gpio@vger.kernel.org
On Fri, Nov 29, 2013 at 6:16 PM, Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
> It's the drivers responsibility to react on failure to get
> the gpio descriptors and not the frameworks. Since there are
> some common peripherals that may or may not have certain
> pins connected to gpio lines, depending on the platform,
> printing the warning there may end up generating useless bug
> reports.
>
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/gpio/gpiolib.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> index 4e10b10..2f0305e 100644
> --- a/drivers/gpio/gpiolib.c
> +++ b/drivers/gpio/gpiolib.c
> @@ -2434,10 +2434,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
> desc = gpiod_find(dev, con_id, idx, &flags);
> }
>
> - if (IS_ERR(desc)) {
> - dev_warn(dev, "lookup for GPIO %s failed\n", con_id);
> + if (IS_ERR(desc))
> return desc;
> - }
>
> status = gpiod_request(desc, con_id);
I kind of agree with the logic that motivates this patch, but how
about turning this warning into dev_dbg() instead so that people who
wish so can still continue using it?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpiolib: don't bother warning when failing to get gpios
2013-11-29 9:37 ` Alexandre Courbot
@ 2013-11-29 11:08 ` Heikki Krogerus
2013-11-29 13:33 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Heikki Krogerus @ 2013-11-29 11:08 UTC (permalink / raw)
To: Alexandre Courbot; +Cc: Linus Walleij, linux-gpio@vger.kernel.org
Hi,
On Fri, Nov 29, 2013 at 06:37:35PM +0900, Alexandre Courbot wrote:
> On Fri, Nov 29, 2013 at 6:16 PM, Heikki Krogerus
> > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
> > index 4e10b10..2f0305e 100644
> > --- a/drivers/gpio/gpiolib.c
> > +++ b/drivers/gpio/gpiolib.c
> > @@ -2434,10 +2434,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
> > desc = gpiod_find(dev, con_id, idx, &flags);
> > }
> >
> > - if (IS_ERR(desc)) {
> > - dev_warn(dev, "lookup for GPIO %s failed\n", con_id);
> > + if (IS_ERR(desc))
> > return desc;
> > - }
> >
> > status = gpiod_request(desc, con_id);
>
> I kind of agree with the logic that motivates this patch, but how
> about turning this warning into dev_dbg() instead so that people who
> wish so can still continue using it?
Sure, I'll send v2 of this and do just that.
Thanks,
--
heikki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpiolib: don't bother warning when failing to get gpios
2013-11-29 11:08 ` Heikki Krogerus
@ 2013-11-29 13:33 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2013-11-29 13:33 UTC (permalink / raw)
To: Heikki Krogerus; +Cc: Alexandre Courbot, linux-gpio@vger.kernel.org
On Fri, Nov 29, 2013 at 12:08 PM, Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
> On Fri, Nov 29, 2013 at 06:37:35PM +0900, Alexandre Courbot wrote:
>> On Fri, Nov 29, 2013 at 6:16 PM, Heikki Krogerus
>> > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
>> > index 4e10b10..2f0305e 100644
>> > --- a/drivers/gpio/gpiolib.c
>> > +++ b/drivers/gpio/gpiolib.c
>> > @@ -2434,10 +2434,8 @@ struct gpio_desc *__must_check gpiod_get_index(struct device *dev,
>> > desc = gpiod_find(dev, con_id, idx, &flags);
>> > }
>> >
>> > - if (IS_ERR(desc)) {
>> > - dev_warn(dev, "lookup for GPIO %s failed\n", con_id);
>> > + if (IS_ERR(desc))
>> > return desc;
>> > - }
>> >
>> > status = gpiod_request(desc, con_id);
>>
>> I kind of agree with the logic that motivates this patch, but how
>> about turning this warning into dev_dbg() instead so that people who
>> wish so can still continue using it?
>
> Sure, I'll send v2 of this and do just that.
Please do, this has been a bit noisy and should probably go in
as a fix.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-29 13:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-29 9:16 [PATCH] gpiolib: don't bother warning when failing to get gpios Heikki Krogerus
2013-11-29 9:37 ` Alexandre Courbot
2013-11-29 11:08 ` Heikki Krogerus
2013-11-29 13:33 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).