]> Gentwo Git Trees - linux/.git/commit
accel/amdxdna: Use int instead of u32 to store error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Thu, 28 Aug 2025 03:39:17 +0000 (11:39 +0800)
committerLizhi Hou <lizhi.hou@amd.com>
Fri, 29 Aug 2025 15:59:26 +0000 (08:59 -0700)
commit24de3daf6179bce3710527b8292d7ee6f1b56393
tree255426320c436c58764e3d692e1565b5cc68fb1a
parent9ca595f501e48cec41c6c56becda6468a409b8ba
accel/amdxdna: Use int instead of u32 to store error codes

Change the 'ret' variable from u32 to int to store -EINVAL.  Storing the
negative error codes in unsigned type, doesn't cause an issue at runtime
but it's ugly as pants.

Additionally, assigning -EINVAL to u32 ret (i.e., u32 ret = -EINVAL) may
trigger a GCC warning when the -Wsign-conversion flag is enabled.

Fixes: aac243092b70 ("accel/amdxdna: Add command execution")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://lore.kernel.org/r/20250828033917.113364-1-rongqianfeng@vivo.com
drivers/accel/amdxdna/aie2_ctx.c