diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2014-12-05 07:34:54 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2016-08-18 07:38:11 -0400 |
commit | a93a4d62324123dcda383bdb4ab89151bbc0e499 (patch) | |
tree | 6b33d42b66ef7979d5388873d7dc36d6930e3d53 /arch/arm64/mm | |
parent | bc9f3d7788a88d080a30599bde68f383daf8f8a5 (diff) |
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>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r-- | arch/arm64/mm/dump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/mm/dump.c b/arch/arm64/mm/dump.c index f94b80eb295d..9c3e75df2180 100644 --- a/arch/arm64/mm/dump.c +++ b/arch/arm64/mm/dump.c | |||
@@ -242,7 +242,7 @@ static void note_page(struct pg_state *st, unsigned long addr, unsigned level, | |||
242 | 242 | ||
243 | static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) | 243 | static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) |
244 | { | 244 | { |
245 | pte_t *pte = pte_offset_kernel(pmd, 0); | 245 | pte_t *pte = pte_offset_kernel(pmd, 0UL); |
246 | unsigned long addr; | 246 | unsigned long addr; |
247 | unsigned i; | 247 | unsigned i; |
248 | 248 | ||
@@ -254,7 +254,7 @@ static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) | |||
254 | 254 | ||
255 | static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) | 255 | static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) |
256 | { | 256 | { |
257 | pmd_t *pmd = pmd_offset(pud, 0); | 257 | pmd_t *pmd = pmd_offset(pud, 0UL); |
258 | unsigned long addr; | 258 | unsigned long addr; |
259 | unsigned i; | 259 | unsigned i; |
260 | 260 | ||
@@ -271,7 +271,7 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start) | |||
271 | 271 | ||
272 | static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start) | 272 | static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start) |
273 | { | 273 | { |
274 | pud_t *pud = pud_offset(pgd, 0); | 274 | pud_t *pud = pud_offset(pgd, 0UL); |
275 | unsigned long addr; | 275 | unsigned long addr; |
276 | unsigned i; | 276 | unsigned i; |
277 | 277 | ||