From: Krzysztof Kozlowski Date: Tue, 3 Mar 2020 20:27:48 +0000 (+0100) Subject: iommu/omap: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit X-Git-Tag: v5.7-rc1~46^2^4~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2ce16c3c15e90f8279ccda8deeb24682a4a3706;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index be551cc34be45..50e8acf88ec49 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -167,7 +167,7 @@ static int omap2_iommu_enable(struct omap_iommu *obj) { u32 l, pa; - if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K)) + if (!obj->iopgd || !IS_ALIGNED((unsigned long)obj->iopgd, SZ_16K)) return -EINVAL; pa = virt_to_phys(obj->iopgd);