• Catalin Marinas's avatar
    arm64: Fix shift warning in arch/arm64/mm/dump.c · a93a4d62
    Catalin Marinas authored
    When building with 48-bit VAs and 16K page configuration, it's possible
    to get the following warning when building the arm64 page table dumping
    code:
    
    arch/arm64/mm/dump.c: In function ‘walk_pud’:
    arch/arm64/mm/dump.c:274:102: warning: right shift count >= width of type [-Wshift-count-overflow]
    
    This is because pud_offset(pgd, 0) performs a shift to the right by 36
    while the value 0 has the type 'int' by default, therefore 32-bit.
    
    This patch modifies all the p*_offset() uses in arch/arm64/mm/dump.c to
    use 0UL for the address argument.
    Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    a93a4d62
dump.c 7.87 KB