lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e22021ef-28b7-54ad-91e8-7a4bac0b878b@enneenne.com>
Date:   Tue, 9 Mar 2021 13:25:05 +0100
From:   Rodolfo Giometti <giometti@...eenne.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Cc:     Ryan Govostes <rgovostes@...i.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH resend v1 2/7] pps: clients: gpio: Use dev_err_probe() to
 avoid log noise

On 09/03/21 12:23, Andy Shevchenko wrote:
> When GPIO APIs return -EPROBE_DEFER there is no need to print the message,
> especially taking into consideration that it may repeat several times.
> Use dev_err_probe() to avoid log noise in such cases.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/pps/clients/pps-gpio.c | 15 ++++++---------
>  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
> index f89c31aa66f1..78c9680e8063 100644
> --- a/drivers/pps/clients/pps-gpio.c
> +++ b/drivers/pps/clients/pps-gpio.c
> @@ -110,19 +110,16 @@ static int pps_gpio_setup(struct platform_device *pdev)
>  	data->gpio_pin = devm_gpiod_get(&pdev->dev,
>  		NULL,	/* request "gpios" */
>  		GPIOD_IN);
> -	if (IS_ERR(data->gpio_pin)) {
> -		dev_err(&pdev->dev,
> -			"failed to request PPS GPIO\n");
> -		return PTR_ERR(data->gpio_pin);
> -	}
> +	if (IS_ERR(data->gpio_pin))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(data->gpio_pin),
> +				     "failed to request PPS GPIO\n");
>  
>  	data->echo_pin = devm_gpiod_get_optional(&pdev->dev,
>  			"echo",
>  			GPIOD_OUT_LOW);
> -	if (IS_ERR(data->echo_pin)) {
> -		dev_err(&pdev->dev, "failed to request ECHO GPIO\n");
> -		return PTR_ERR(data->echo_pin);
> -	}
> +	if (IS_ERR(data->echo_pin))
> +		return dev_err_probe(&pdev->dev, PTR_ERR(data->echo_pin),
> +				     "failed to request ECHO GPIO\n");
>  
>  	if (data->echo_pin) {
>  		ret = of_property_read_u32(np,
> 

Acked-by: Rodolfo Giometti <giometti@...eenne.com>

-- 
GNU/Linux Solutions                  e-mail: giometti@...eenne.com
Linux Device Driver                          giometti@...ux.it
Embedded Systems                     phone:  +39 349 2432127
UNIX programming                     skype:  rodolfo.giometti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ