Skip to content

Commit e520b25

Browse files
qianfengrongjoergroedel
authored andcommitted
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 <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 8f5ae30 commit e520b25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/omap-iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1303,8 +1303,8 @@ static int omap_iommu_map(struct iommu_domain *domain, unsigned long da,
13031303
struct omap_iommu_device *iommu;
13041304
struct omap_iommu *oiommu;
13051305
struct iotlb_entry e;
1306+
int ret = -EINVAL;
13061307
int omap_pgsz;
1307-
u32 ret = -EINVAL;
13081308
int i;
13091309

13101310
omap_pgsz = bytes_to_iopgsz(bytes);

0 commit comments

Comments
 (0)