]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: Fix shift warning in arch/arm64/mm/dump.c
authorCatalin Marinas <catalin.marinas@arm.com>
Fri, 5 Dec 2014 12:34:54 +0000 (12:34 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 18 Aug 2016 11:38:11 +0000 (12:38 +0100)
commitd58b6b519b7323b5ee8808dca44e5c58b7b7bf5f
tree6b33d42b66ef7979d5388873d7dc36d6930e3d53
parentfbdc3ce4a7dc7e80156c4e3f4a1a6d7771215f47
arm64: Fix shift warning in arch/arm64/mm/dump.c

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: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/mm/dump.c