]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/omap: Use int type to store negative error codes
authorQianfeng Rong <rongqianfeng@vivo.com>
Fri, 29 Aug 2025 14:02:19 +0000 (22:02 +0800)
committerJoerg Roedel <joerg.roedel@amd.com>
Fri, 5 Sep 2025 12:58:26 +0000 (14:58 +0200)
commite520b2520c81c5e4fe1b8ef09cb75c132debe9ac
tree352a7070516611bc4dc0dff0fc41f9ce1973330a
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
iommu/omap: Use int type to store negative error codes

Change the 'ret' variable from u32 to int to store negative error codes
or zero;

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly. Additionally, assigning negative error codes to
unsigned type may trigger a GCC warning when the -Wsign-conversion flag
is enabled.

No effect on runtime.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20250829140219.121783-1-rongqianfeng@vivo.com
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/omap-iommu.c