[bug report] iommu: rockchip: Add support for iommu v2
Dan Carpenter
dan.carpenter at oracle.com
Fri Jun 18 02:15:47 PDT 2021
Hello Benjamin Gaignard,
The patch c55356c534aa: "iommu: rockchip: Add support for iommu v2"
from Jun 4, 2021, leads to the following static checker warning:
drivers/iommu/rockchip-iommu.c:552 rk_dte_addr_phys_v2()
warn: potential shift truncation. '0xff00000000 (0,4294967296-1095216660480) << 28'
drivers/iommu/rockchip-iommu.c
544 }
545
546 #define DT_HI_MASK GENMASK_ULL(39, 32)
^^^^^^^^^^^^^^^^^^^
547 #define DT_SHIFT 28
548
549 static inline phys_addr_t rk_dte_addr_phys_v2(u32 addr)
550 {
551 return (phys_addr_t)(addr & RK_DTE_PT_ADDRESS_MASK) |
552 ((addr & DT_HI_MASK) << DT_SHIFT);
^^^^^^^^^^^^^^^^^
Is addr supposed to be a u64?
553 }
regards,
dan carpenter
More information about the Linux-rockchip
mailing list