Skip to content

Commit f2ce16c

Browse files
krzkjoergroedel
authored andcommitted
iommu/omap: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit
pointers should be casted to unsigned long to avoid -Wpointer-to-int-cast warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/iommu/omap-iommu.c: In function ‘omap2_iommu_enable’: drivers/iommu/omap-iommu.c:170:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K)) ^ Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent f8788d8 commit f2ce16c

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
@@ -167,7 +167,7 @@ static int omap2_iommu_enable(struct omap_iommu *obj)
167167
{
168168
u32 l, pa;
169169

170-
if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K))
170+
if (!obj->iopgd || !IS_ALIGNED((unsigned long)obj->iopgd, SZ_16K))
171171
return -EINVAL;
172172

173173
pa = virt_to_phys(obj->iopgd);

0 commit comments

Comments
 (0)