]> Git Repo - linux.git/commit
include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used
authorQian Cai <[email protected]>
Tue, 13 Aug 2019 22:37:47 +0000 (15:37 -0700)
committerLinus Torvalds <[email protected]>
Tue, 13 Aug 2019 23:06:52 +0000 (16:06 -0700)
commit0cfaee2af3a04c0be5f056cebe5f804dedc59a43
treed41868a7d16e527f249c18880e62c572ac127286
parent6a2aeab59e97101b4001bac84388fc49a992f87e
include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used

A compiler throws a warning on an arm64 system since commit 9849a5697d3d
("arch, mm: convert all architectures to use 5level-fixup.h"),

  mm/kasan/init.c: In function 'kasan_free_p4d':
  mm/kasan/init.c:344:9: warning: variable 'p4d' set but not used [-Wunused-but-set-variable]
   p4d_t *p4d;
          ^~~

because p4d_none() in "5level-fixup.h" is compiled away while it is a
static inline function in "pgtable-nopud.h".

However, if converted p4d_none() to a static inline there, powerpc would
be unhappy as it reads those in assembler language in
"arch/powerpc/include/asm/book3s/64/pgtable.h", so it needs to skip
assembly include for the static inline C function.

While at it, converted a few similar functions to be consistent with the
ones in "pgtable-nopud.h".

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Qian Cai <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/asm-generic/5level-fixup.h
This page took 0.054338 seconds and 4 git commands to generate.