• Yong Wu's avatar
    iommu/mediatek: Fix a build warning of BIT(32) in ARM · 41939980
    Yong Wu authored
    The commit ("iommu/mediatek: Enlarge the validate PA range
    for 4GB mode") introduce the following build warning while ARCH=arm:
    
       drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_iova_to_phys':
       include/linux/bitops.h:6:24: warning: left shift count >= width
    of type [-Wshift-count-overflow]
        #define BIT(nr)   (1UL << (nr))
                               ^
    >> drivers/iommu/mtk_iommu.c:407:9: note: in expansion of macro 'BIT'
          pa |= BIT(32);
    
      drivers/iommu/mtk_iommu.c: In function 'mtk_iommu_probe':
       include/linux/bitops.h:6:24: warning: left shift count >= width
    of type [-Wshift-count-overflow]
        #define BIT(nr)   (1UL << (nr))
                               ^
       drivers/iommu/mtk_iommu.c:589:35: note: in expansion of macro 'BIT'
         data->enable_4GB = !!(max_pfn > (BIT(32) >> PAGE_SHIFT));
    
    Use BIT_ULL instead of BIT.
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Signed-off-by: default avatarYong Wu <yong.wu@mediatek.com>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    41939980
mtk_iommu.c 20.2 KB