Skip to content

Commit 81a8f2b

Browse files
huthMartin Schwidefsky
authored andcommitted
s390/mm: silence compiler warning when compiling without CONFIG_PGSTE
If CONFIG_PGSTE is not set (e.g. when compiling without KVM), GCC complains: CC arch/s390/mm/pgtable.o arch/s390/mm/pgtable.c:413:15: warning: ‘pmd_alloc_map’ defined but not used [-Wunused-function] static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr) ^~~~~~~~~~~~~ Wrap the function with "#ifdef CONFIG_PGSTE" to silence the warning. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent dccbbaf commit 81a8f2b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/s390/mm/pgtable.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ static inline pmd_t pmdp_flush_lazy(struct mm_struct *mm,
410410
return old;
411411
}
412412

413+
#ifdef CONFIG_PGSTE
413414
static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr)
414415
{
415416
pgd_t *pgd;
@@ -427,6 +428,7 @@ static pmd_t *pmd_alloc_map(struct mm_struct *mm, unsigned long addr)
427428
pmd = pmd_alloc(mm, pud, addr);
428429
return pmd;
429430
}
431+
#endif
430432

431433
pmd_t pmdp_xchg_direct(struct mm_struct *mm, unsigned long addr,
432434
pmd_t *pmdp, pmd_t new)

0 commit comments

Comments
 (0)