[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMTyraqo3GukxpnO@gondor.apana.org.au>
Date: Sat, 13 Sep 2025 12:27:25 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Qianfeng Rong <rongqianfeng@...o.com>
Cc: Ashish Kalra <ashish.kalra@....com>,
Tom Lendacky <thomas.lendacky@....com>,
John Allen <john.allen@....com>,
"David S. Miller" <davem@...emloft.net>,
Akhil R <akhilrajeev@...dia.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Uwe Kleine-König <u.kleine-koenig@...libre.com>,
Colin Ian King <colin.i.king@...il.com>,
"open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - SE..." <linux-crypto@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:TEGRA ARCHITECTURE SUPPORT" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH 0/3] crypto: Use int type to store negative error codes
On Wed, Sep 03, 2025 at 09:25:34PM +0800, Qianfeng Rong wrote:
> The 'ret' variable usually is used to store returns from some functions,
> which return either zero on success or negative error codes on failure.
>
> Storing the negative error codes in unsigned type, doesn't cause an issue
> at runtime but can be confusing. Additionally, assigning negative error
> codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
> flag is enabled.
>
> Change 'ret' from u32/unsigned int to int type. No effect on runtime.
>
> Qianfeng Rong (3):
> crypto: ccp - Use int type to store negative error codes
> crypto: hisilicon/sec - Use int type to store negative error codes
> crypto: tegra - Use int type to store negative error codes
>
> drivers/crypto/ccp/sev-dev.c | 3 ++-
> drivers/crypto/hisilicon/sec/sec_drv.c | 3 ++-
> drivers/crypto/tegra/tegra-se-hash.c | 3 ++-
> 3 files changed, 6 insertions(+), 3 deletions(-)
>
> --
> 2.34.1
All applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists