[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250829140219.121783-1-rongqianfeng@vivo.com>
Date: Fri, 29 Aug 2025 22:02:19 +0800
From: Qianfeng Rong <rongqianfeng@...o.com>
To: Joerg Roedel <joro@...tes.org>,
Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Qianfeng Rong <rongqianfeng@...o.com>
Subject: [PATCH] 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@...o.com>
---
drivers/iommu/omap-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 6fb93927bdb9..5c6f5943f44b 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -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);
--
2.34.1
Powered by blists - more mailing lists