Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1563866

Re: [PATCH v2 5/7] Input: pwm-beeper - suppress error message on probe defer

From David Lechner <david@lechnology.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 5/7] Input: pwm-beeper - suppress error message on probe defer
Date 2017-01-20 19:50 +0100
Message-ID <t1Mq5-2nB-11@gated-at.bofh.it> (permalink)
References <t1tGN-7wg-1@gated-at.bofh.it> <t1tGO-7wg-15@gated-at.bofh.it> <t1Esz-5Zp-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 01/20/2017 04:16 AM, Thierry Reding wrote:
> On Thu, Jan 19, 2017 at 02:40:55PM -0800, Dmitry Torokhov wrote:
>> From: David Lechner <david@lechnology.com>
>>
>> This suppress printing an error message when pwm_get returns -EPROBE_DEFER.
>> Otherwise you get a bunch of noise in the kernel log.
>>
>> Signed-off-by: David Lechner <david@lechnology.com>
>> Patchwork-Id: 9499915
>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> ---
>>  drivers/input/misc/pwm-beeper.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
>> index 04c8ad3827d9..9964c46468d3 100644
>> --- a/drivers/input/misc/pwm-beeper.c
>> +++ b/drivers/input/misc/pwm-beeper.c
>> @@ -108,7 +108,8 @@ static int pwm_beeper_probe(struct platform_device *pdev)
>>  	beeper->pwm = devm_pwm_get(dev, NULL);
>>  	if (IS_ERR(beeper->pwm)) {
>>  		error = PTR_ERR(beeper->pwm);
>> -		dev_err(dev, "Failed to request pwm device: %d\n", error);
>> +		if (error != -EPROBE_DEFER)
>> +			dev_err(dev, "Failed to request pwm device\n");
>
> This also drops the error code from the message. I suspect that this was
> intentional because failure to probe will print out the error code
> anyway. Might be worth mentioning that in the commit message?

Yes, it was intentional for that reason. And in fact we could do the 
same thing to the error messages that are touched in patch 2/7 of this 
series.

>
> Either way:
>
> Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 1/7] Input: pwm-beeper - remove calls to legacy pwm_request API Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
  [PATCH v2 5/7] Input: pwm-beeper - suppress error message on probe defer Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
    Re: [PATCH v2 5/7] Input: pwm-beeper - suppress error message on  probe defer Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:20 +0100
      Re: [PATCH v2 5/7] Input: pwm-beeper - suppress error message on  probe defer David Lechner <david@lechnology.com> - 2017-01-20 19:50 +0100
  [PATCH v2 2/7] Input: pwm-beeper - switch to using managed resources Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
    Re: [PATCH v2 2/7] Input: pwm-beeper - switch to using managed  resources Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:20 +0100
  [PATCH v2 6/7] Input: pwm-beeper - add optional amplifier regulator Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
    Re: [PATCH v2 6/7] Input: pwm-beeper - add optional amplifier  regulator Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:20 +0100
      Re: [PATCH v2 6/7] Input: pwm-beeper - add optional amplifier  regulator Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-20 18:50 +0100
  [PATCH v2 4/7] Input: pwm-beeper - fix race when suspending Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
    Re: [PATCH v2 4/7] Input: pwm-beeper - fix race when suspending Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:20 +0100
  [PATCH v2 3/7] Input: pwm-beeper - use input_set_capability() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
    Re: [PATCH v2 3/7] Input: pwm-beeper - use input_set_capability() Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:20 +0100
  [PATCH v2 7/7] Input: pwm-beeper - switch to using "atomic" PWM API Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-19 23:50 +0100
    Re: [PATCH v2 7/7] Input: pwm-beeper - switch to using "atomic" PWM  API Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:40 +0100
  Re: [PATCH v2 1/7] Input: pwm-beeper - remove calls to legacy  pwm_request API Thierry Reding <thierry.reding@gmail.com> - 2017-01-20 11:10 +0100
  Re: [PATCH v2 1/7] Input: pwm-beeper - remove calls to legacy  pwm_request API David Lechner <david@lechnology.com> - 2017-01-20 20:40 +0100

csiph-web