OSDN Git Service

binfmt_elf: compat: avoid unused function warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 Feb 2018 11:54:52 +0000 (12:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:03:51 +0000 (11:03 +0100)
commitb8b624d9885fea0d0bb7f51d9548004cd6882002
tree49bd15c21d1c0c4a99eb6d94da2dd5133c082260
parent9e9c3045bb4521c0eb92cf533cba2f8ba5bd1a69
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