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: <4426qubj6oy3kwrxtzjyc5imhxhmgapjibbv55gig22pxfrjrm@qhk7larn3qnk>
Date: Thu, 19 Sep 2024 15:26:21 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: linux-mediatek@...ts.infradead.org, matthias.bgg@...il.com, 
	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, kernel@...labora.com
Subject: Re: [PATCH] firmware: mtk-adsp-ipc: Switch to using dev_err_probe()

Hello

On Thu, Sep 19, 2024 at 02:02:08PM +0200, AngeloGioacchino Del Regno wrote:
> There is an error path that checks whether the return value is
> -EPROBE_DEFER to decide whether to print the error message: that
> is exactly open-coding dev_err_probe(), so, switch to that.
> 
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
> ---
>  drivers/firmware/mtk-adsp-ipc.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/firmware/mtk-adsp-ipc.c b/drivers/firmware/mtk-adsp-ipc.c
> index a762302978de..fdb083f42ebf 100644
> --- a/drivers/firmware/mtk-adsp-ipc.c
> +++ b/drivers/firmware/mtk-adsp-ipc.c
> @@ -95,10 +95,9 @@ static int mtk_adsp_ipc_probe(struct platform_device *pdev)
>  		adsp_chan->idx = i;
>  		adsp_chan->ch = mbox_request_channel_byname(cl, adsp_mbox_ch_names[i]);
>  		if (IS_ERR(adsp_chan->ch)) {
> -			ret = PTR_ERR(adsp_chan->ch);
> -			if (ret != -EPROBE_DEFER)
> -				dev_err(dev, "Failed to request mbox chan %s ret %d\n",
> -					adsp_mbox_ch_names[i], ret);
> +			ret = dev_err_probe(dev, PTR_ERR(adsp_chan->ch),
> +					    "Failed to request mbox channel %s\n",
> +					    adsp_mbox_ch_names[i]);
>  

Looks good to me:

Acked-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>

Best regards
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ