Re: [PATCH] gpiolib: suppress error message on EPROBE_DEFER

2018-02-22 Thread Linus Walleij
On Sun, Feb 18, 2018 at 4:47 AM, David Lechner  wrote:
> On 02/07/2018 06:57 AM, Linus Walleij wrote:
>>
>> On Sun, Jan 21, 2018 at 9:32 PM, David Lechner 
>> wrote:
>>
>>> This suppresses printing an error message during probe of gpio drivers
>>> when the error is EPROBE_DEFER.
>>>
>>> Cc: Linus Walleij 
>>> Signed-off-by: David Lechner 
>>
>>
>> I'm not sure about this.
>>
>> GPIO can be very basic system components. If we don't
>> print this, defer a few times (for some reason) and then
>> the kernel gives up on retrying, silently (as it happens)
>> there is no trace in dmesg of what happened. That makes
>> things hard to debug.
>>
>> This happened to me with some other driver, so it is not
>> a made up example.
>>
>> What about an explicit deferral message for now?
>
>
> so you mean something like this?
>
> if (err == -EPROBE_DEFER)
> dev_info(dev, "deferring probe\n")
> else
> dev_err(dev, "... failed to register\n")

Yes exactly.

It has been brought to my attention that people are especially
allergic to dmesg messages containing the word "failed". So
if that is the problem, let's avoid it like this.

Yours,
Linus Walleij


Re: [PATCH] gpiolib: suppress error message on EPROBE_DEFER

2018-02-17 Thread David Lechner

On 02/07/2018 06:57 AM, Linus Walleij wrote:

On Sun, Jan 21, 2018 at 9:32 PM, David Lechner  wrote:


This suppresses printing an error message during probe of gpio drivers
when the error is EPROBE_DEFER.

Cc: Linus Walleij 
Signed-off-by: David Lechner 


I'm not sure about this.

GPIO can be very basic system components. If we don't
print this, defer a few times (for some reason) and then
the kernel gives up on retrying, silently (as it happens)
there is no trace in dmesg of what happened. That makes
things hard to debug.

This happened to me with some other driver, so it is not
a made up example.

What about an explicit deferral message for now?


so you mean something like this?

if (err == -EPROBE_DEFER)
dev_info(dev, "deferring probe\n")
else
dev_err(dev, "... failed to register\n")


Re: [PATCH] gpiolib: suppress error message on EPROBE_DEFER

2018-02-08 Thread Grygorii Strashko


On 02/07/2018 06:57 AM, Linus Walleij wrote:
> On Sun, Jan 21, 2018 at 9:32 PM, David Lechner  wrote:
> 
>> This suppresses printing an error message during probe of gpio drivers
>> when the error is EPROBE_DEFER.
>>
>> Cc: Linus Walleij 
>> Signed-off-by: David Lechner 
> 
> I'm not sure about this.
> 
> GPIO can be very basic system components. If we don't
> print this, defer a few times (for some reason) and then
> the kernel gives up on retrying, silently (as it happens)
> there is no trace in dmesg of what happened. That makes
> things hard to debug.
> 
> This happened to me with some other driver, so it is not
> a made up example.
> 
> What about an explicit deferral message for now?
> 

The DD has debuging prints for all cases, so in general it can be used
for boot debugging (really_probe()). So, in my opinion it make sense to 
print gpiolib specific message only in case of !EPROBE_DEFER.

5c

-- 
regards,
-grygorii


Re: [PATCH] gpiolib: suppress error message on EPROBE_DEFER

2018-02-07 Thread Linus Walleij
On Sun, Jan 21, 2018 at 9:32 PM, David Lechner  wrote:

> This suppresses printing an error message during probe of gpio drivers
> when the error is EPROBE_DEFER.
>
> Cc: Linus Walleij 
> Signed-off-by: David Lechner 

I'm not sure about this.

GPIO can be very basic system components. If we don't
print this, defer a few times (for some reason) and then
the kernel gives up on retrying, silently (as it happens)
there is no trace in dmesg of what happened. That makes
things hard to debug.

This happened to me with some other driver, so it is not
a made up example.

What about an explicit deferral message for now?

Yours,
Linus Walleij