Commit e520b252 authored by Qianfeng Rong's avatar Qianfeng Rong Committed by Joerg Roedel
Browse files

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: default avatarQianfeng Rong <rongqianfeng@vivo.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20250829140219.121783-1-rongqianfeng@vivo.com


Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 8f5ae30d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1303,8 +1303,8 @@ static int omap_iommu_map(struct iommu_domain *domain, unsigned long da,
	struct omap_iommu_device *iommu;
	struct omap_iommu *oiommu;
	struct iotlb_entry e;
	int ret = -EINVAL;
	int omap_pgsz;
	u32 ret = -EINVAL;
	int i;

	omap_pgsz = bytes_to_iopgsz(bytes);