coredump: Move dump_emit_page() to kill unused warning
authorGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 3 Oct 2022 09:06:57 +0000 (11:06 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Jan 2023 02:03:01 +0000 (21:03 -0500)
commit9c7417b5ec440242bb5b64521acd53d4e19130c1
treedf7559885a2b4709981f4c17fcee3917f187b1cc
parentb7bfaa761d760e72a969d116517eaa12e404c262
coredump: Move dump_emit_page() to kill unused warning

If CONFIG_ELF_CORE is not set:

    fs/coredump.c:835:12: error: ‘dump_emit_page’ defined but not used [-Werror=unused-function]
      835 | static int dump_emit_page(struct coredump_params *cprm, struct page *page)
          |            ^~~~~~~~~~~~~~

Fix this by moving dump_emit_page() inside the existing section
protected by #ifdef CONFIG_ELF_CORE.

Fixes: 06bbaa6dc53cb720 ("[coredump] don't use __kernel_write() on kmap_local_page()")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/coredump.c