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]
Date:   Fri, 5 Aug 2022 21:49:22 +0000
From:   <Conor.Dooley@...rochip.com>
To:     <christophe.jaillet@...adoo.fr>, <Conor.Dooley@...rochip.com>,
        <Daire.McNamara@...rochip.com>, <broonie@...nel.org>,
        <yangyingliang@...wei.com>
CC:     <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        <linux-riscv@...ts.infradead.org>, <linux-spi@...r.kernel.org>
Subject: Re: [PATCH] spi: microchip-core: Simplify some error message

On 05/08/2022 22:33, 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.
> 
> Moreover, in the case of devm_clk_get() it would only display '0' because
> 'ret' is know to be 0 at this point.
> 
> Fixes: cdeaf3a99a02 ("spi: microchip-core: switch to use dev_err_probe()")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

bah, should have noticed that when I reviewed the switch over...
Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>
Thanks!

> ---
>  drivers/spi/spi-microchip-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
> index ce4385330b19..d352844c798c 100644
> --- a/drivers/spi/spi-microchip-core.c
> +++ b/drivers/spi/spi-microchip-core.c
> @@ -548,12 +548,12 @@ static int mchp_corespi_probe(struct platform_device *pdev)
>  			       IRQF_SHARED, dev_name(&pdev->dev), master);
>  	if (ret)
>  		return dev_err_probe(&pdev->dev, ret,
> -				     "could not request irq: %d\n", ret);
> +				     "could not request irq\n");
>  
>  	spi->clk = devm_clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(spi->clk))
>  		return dev_err_probe(&pdev->dev, PTR_ERR(spi->clk),
> -				     "could not get clk: %d\n", ret);
> +				     "could not get clk\n");
>  
>  	ret = clk_prepare_enable(spi->clk);
>  	if (ret)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ