Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <krzk@kernel.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>

authored by

Krzysztof Kozlowski and committed by
Joerg Roedel
f2ce16c3 f8788d86

+1 -1
+1 -1
drivers/iommu/omap-iommu.c
··· 167 167 { 168 168 u32 l, pa; 169 169 170 - if (!obj->iopgd || !IS_ALIGNED((u32)obj->iopgd, SZ_16K)) 170 + if (!obj->iopgd || !IS_ALIGNED((unsigned long)obj->iopgd, SZ_16K)) 171 171 return -EINVAL; 172 172 173 173 pa = virt_to_phys(obj->iopgd);