summaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorQian Cai2019-07-31 22:05:45 +0200
committerWill Deacon2019-08-01 16:00:27 +0200
commit7d4e2dcf311d3b98421d1f119efe5964cafa32fc (patch)
tree46704a50130b71f338921b99515616a4f09f70c8 /arch/arm64
parentarm64: Remove unneeded rcu_read_lock from debug handlers (diff)
downloadkernel-qcow2-linux-7d4e2dcf311d3b98421d1f119efe5964cafa32fc.tar.gz
kernel-qcow2-linux-7d4e2dcf311d3b98421d1f119efe5964cafa32fc.tar.xz
kernel-qcow2-linux-7d4e2dcf311d3b98421d1f119efe5964cafa32fc.zip
arm64/mm: fix variable 'pud' set but not used
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>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/pgtable.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 3f5461f7b560..5fdcfe237338 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -447,8 +447,8 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
PMD_TYPE_SECT)
#if defined(CONFIG_ARM64_64K_PAGES) || CONFIG_PGTABLE_LEVELS < 3
-#define pud_sect(pud) (0)
-#define pud_table(pud) (1)
+static inline bool pud_sect(pud_t pud) { return false; }
+static inline bool pud_table(pud_t pud) { return true; }
#else
#define pud_sect(pud) ((pud_val(pud) & PUD_TYPE_MASK) == \
PUD_TYPE_SECT)