• Arnd Bergmann's avatar
    iommu/exynos: Pointers are nto physical addresses · dbf6c6ef
    Arnd Bergmann authored
    The exynos iommu driver changed an incorrect cast from pointer
    to 'unsigned int' to an equally incorrect cast to a 'phys_addr_t',
    which results in an obvious compile-time error when phys_addr_t
    is wider than pointers are:
    
    drivers/iommu/exynos-iommu.c: In function 'alloc_lv2entry':
    drivers/iommu/exynos-iommu.c:918:32: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
    
    The code does not actually want the physical address (which would
    involve using virt_to_phys()), but just checks the alignment,
    so we can change it to use a cast to uintptr_t instead.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Fixes: 740a01ee ("iommu/exynos: Add support for v5 SYSMMU")
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    dbf6c6ef
exynos-iommu.c 36.4 KB