Skip to content
Commit 2e126aa2 authored by Mike Rapoport's avatar Mike Rapoport Committed by Andrew Morton
Browse files

mm/sparse: fix "unused function 'pgdat_to_phys'" warning

W=1 build with clangs complains:

mm/sparse.c:347:27: warning: unused function 'pgdat_to_phys' [-Wunused-function]
static inline phys_addr_t pgdat_to_phys(struct pglist_data *pgdat)
                             ^
1 warning generated.

pgdat_to_phys() is only used by functions defined when
CONFIG_MEMORY_HOTREMOVE=y.

Move pgdat_to_phys() under #ifdef CONFIG_MEMORY_HOTREMOVE
to make clang happy.

Link: https://lkml.kernel.org/r/20230121101151.1703292-1-rppt@kernel.org


Signed-off-by: default avatarMike Rapoport <rppt@kernel.org>
Reported-by: default avatarkernel test robot <lkp@intel.com>
  Link: https://lore.kernel.org/all/202301210155.1E5zABb5-lkp@intel.com


Cc: Miles Chen <miles.chen@mediatek.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 05a42199
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment