linux/drivers/accel/amdxdna
Qianfeng Rong 8e0a18d6ee accel/amdxdna: Use int instead of u32 to store error codes
[ Upstream commit 24de3daf61 ]

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: aac243092b ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:03:48 +02:00
..
aie2_ctx.c accel/amdxdna: Use int instead of u32 to store error codes 2025-10-15 12:03:48 +02:00
aie2_error.c accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
aie2_message.c accel/amdxdna: Fix incorrect size of ERT_START_NPU commands 2025-04-10 10:45:39 -07:00
aie2_msg_priv.h accel/amdxdna: Fix incorrect size of ERT_START_NPU commands 2025-04-10 10:45:39 -07:00
aie2_pci.c iommu: Remove IOMMU_DEV_FEAT_SVA 2025-04-28 13:04:29 +02:00
aie2_pci.h accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
aie2_pm.c accel/amdxdna: Enhance power management settings 2024-12-16 15:50:32 -06:00
aie2_psp.c accel/amdxdna: Fix incorrect PSP firmware size 2025-06-09 07:16:32 -07:00
aie2_smu.c accel/amdxdna: Return error when setting clock failed for npu1 2025-01-09 13:53:22 -06:00
aie2_solver.c accel/amdxdna: include linux/slab.h 2024-12-18 08:14:12 -06:00
aie2_solver.h accel/amdxdna: Enhance power management settings 2024-12-16 15:50:32 -06:00
amdxdna_ctx.c accel/amdxdna: Support submit commands without arguments 2025-05-08 09:58:21 -07:00
amdxdna_ctx.h accel/amdxdna: Refactor hardware context destroy routine 2025-02-14 08:36:07 -07:00
amdxdna_gem.c accel/amdxdna: Revise device bo creation and free 2025-06-16 22:29:09 -07:00
amdxdna_gem.h accel/amdxdna: Revise device bo creation and free 2025-06-16 22:29:09 -07:00
amdxdna_mailbox.c accel/amdxdna: Check interrupt register before mailbox_rx_worker exits 2025-02-27 08:41:46 -06:00
amdxdna_mailbox.h accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_mailbox_helper.c accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_mailbox_helper.h accel/amdxdna: Remove casting mailbox payload pointer 2025-01-13 14:21:39 -06:00
amdxdna_pci_drv.c accel/amdxdna: Add BO import and export 2025-03-28 11:14:06 -07:00
amdxdna_pci_drv.h accel/amdxdna: Add BO import and export 2025-03-28 11:14:06 -07:00
amdxdna_sysfs.c accel/amdxdna: Add command execution 2024-11-22 11:43:27 -07:00
Kconfig accel/amdxdna: Add a new driver for AMD AI Engine 2024-11-22 11:41:26 -07:00
Makefile accel/amdxdna: Enhance power management settings 2024-12-16 15:50:32 -06:00
npu1_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu2_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu4_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu5_regs.c accel/amdxdna: Declare npu device profile as static variables 2025-01-03 23:37:52 -06:00
npu6_regs.c accel/amdxdna: Declare npu6_dev_priv as static 2025-01-03 23:38:22 -06:00
TODO accel/amdxdna: Add BO import and export 2025-03-28 11:14:06 -07:00