OSDN Git Service

arm64/mm: fix variable 'pud' set but not used
authorQian Cai <cai@lca.pw>
Wed, 31 Jul 2019 20:05:45 +0000 (16:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2019 08:51:47 +0000 (10:51 +0200)
commit07a6a92898b53e1914a3c23d053deb3608c25a1c
tree0f2e88294ed7492189f7a2c15fc3db94f4ab28a9
parent7796efd65eb333d3ae266910c8094145509b5694
arm64/mm: fix variable 'pud' set but not used

[ Upstream commit 7d4e2dcf311d3b98421d1f119efe5964cafa32fc ]

GCC throws a warning,

arch/arm64/mm/mmu.c: In function 'pud_free_pmd_page':
arch/arm64/mm/mmu.c:1033:8: warning: variable 'pud' set but not used
[-Wunused-but-set-variable]
  pud_t pud;
        ^~~

because pud_table() is a macro and compiled away. Fix it by making it a
static inline function and for pud_sect() as well.

Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/include/asm/pgtable.h