[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250903132539.416439-1-rongqianfeng@vivo.com>
Date: Wed, 3 Sep 2025 21:25:34 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Ashish Kalra <ashish.kalra@....com>,
Tom Lendacky <thomas.lendacky@....com>,
John Allen <john.allen@....com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"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>,
Qianfeng Rong <rongqianfeng@...o.com>,
linux-crypto@...r.kernel.org (open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - SE...),
linux-kernel@...r.kernel.org (open list),
linux-tegra@...r.kernel.org (open list:TEGRA ARCHITECTURE SUPPORT)
Subject: [PATCH 0/3] crypto: Use int type to store negative error codes
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
Powered by blists - more mailing lists