binfmt_elf: compat: avoid unused function warning
authorArnd Bergmann <arnd@arndb.de>
Mon, 19 Feb 2018 10:13:23 +0000 (11:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:05:55 +0000 (11:05 +0100)
commit890c52ab3d2a7e19714f698d36e83ef8e1a8e1b3
treeec0a30a44aa413d6edfc94e48330489b13d17b87
parent5fe751401360595346f375cabcb8c04a5aa2bf37
binfmt_elf: compat: avoid unused function warning

When CONFIG_ELF_CORE is disabled, we get a harmless warning in the compat
version of binfmt_elf:

fs/compat_binfmt_elf.c:58:13: error: 'cputime_to_compat_timeval' defined but not used [-Werror=unused-function]

This was addressed in mainline Linux as part of a larger rework with commit
cd19c364b313 ("fs/binfmt: Convert obsolete cputime type to nsecs").

For 4.9 and earlier, this just shuts up the warning by adding an #ifdef
around the function definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/compat_binfmt_elf.c