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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <267e2c23f488756ab3256f787750ef4979398279.camel@mediatek.com>
Date:   Thu, 11 Aug 2022 15:49:13 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>
CC:     <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        <linux-usb@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v2] usb: common: usb-conn-gpio: Simplify some error
 message

On Tue, 2022-08-09 at 22:28 +0200, Christophe JAILLET wrote:
> dev_err_probe() already prints the error code in a human readable
> way, so
> there is no need to duplicate it as a numerical value at the end of
> the
> message.
> 
> Fixes: ddaf0d6dc467 ("usb: common: usb-conn-gpio: use dev_err_probe()
> to print log")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> Change in v2:
>   * keep the message on the same line of dev_err_probe() because the
> line is
>     still < 100 char   [Chunfeng Yun <chunfeng.yun@...iatek.com>]
> ---
>  drivers/usb/common/usb-conn-gpio.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/common/usb-conn-gpio.c
> b/drivers/usb/common/usb-conn-gpio.c
> index b39c9f1c375d..44c5127175b7 100644
> --- a/drivers/usb/common/usb-conn-gpio.c
> +++ b/drivers/usb/common/usb-conn-gpio.c
> @@ -208,10 +208,8 @@ static int usb_conn_probe(struct platform_device
> *pdev)
>  	if (PTR_ERR(info->vbus) == -ENODEV)
>  		info->vbus = NULL;
>  
> -	if (IS_ERR(info->vbus)) {
> -		ret = PTR_ERR(info->vbus);
> -		return dev_err_probe(dev, ret, "failed to get vbus
> :%d\n", ret);
> -	}
> +	if (IS_ERR(info->vbus))
> +		return dev_err_probe(dev, PTR_ERR(info->vbus), "failed
> to get vbus\n");
>  
>  	info->role_sw = usb_role_switch_get(dev);
>  	if (IS_ERR(info->role_sw))
Reviewed-by: Chunfeng Yun <chunfeng.yun@...iatek.com>

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ