All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: stable@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org
Subject: [4.4-stable 05/22] binfmt_elf: compat: avoid unused function warning
Date: Tue, 20 Feb 2018 12:54:52 +0100	[thread overview]
Message-ID: <20180220115527.1806578-6-arnd@arndb.de> (raw)
In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de>

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>
---
 fs/compat_binfmt_elf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/compat_binfmt_elf.c b/fs/compat_binfmt_elf.c
index 4d24d17bcfc1..943be5ecfcd9 100644
--- a/fs/compat_binfmt_elf.c
+++ b/fs/compat_binfmt_elf.c
@@ -51,6 +51,7 @@
 #define elf_prstatus	compat_elf_prstatus
 #define elf_prpsinfo	compat_elf_prpsinfo
 
+#ifdef CONFIG_ELF_CORE
 /*
  * Compat version of cputime_to_compat_timeval, perhaps this
  * should be an inline in <linux/compat.h>.
@@ -63,6 +64,7 @@ static void cputime_to_compat_timeval(const cputime_t cputime,
 	value->tv_sec = tv.tv_sec;
 	value->tv_usec = tv.tv_usec;
 }
+#endif
 
 #undef cputime_to_timeval
 #define cputime_to_timeval cputime_to_compat_timeval
-- 
2.9.0

  parent reply	other threads:[~2018-02-20 11:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 11:54 [4.4-stable 00/22] patches for 'randconfig' Arnd Bergmann
2018-02-20 11:54 ` [4.4-stable 01/22] gpio: xgene: mark PM functions as __maybe_unused Arnd Bergmann
2018-02-20 11:54 ` [4.4-stable 02/22] Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig" Arnd Bergmann
2018-02-23 16:38   ` Patch "Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig"" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 03/22] power: bq27xxx_battery: mark some symbols __maybe_unused Arnd Bergmann
2018-02-23 16:38   ` Patch "power: bq27xxx_battery: mark some symbols __maybe_unused" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 04/22] isdn: sc: work around type mismatch warning Arnd Bergmann
2018-02-23 16:37   ` Patch "isdn: sc: work around type mismatch warning" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` Arnd Bergmann [this message]
2018-02-23 16:36   ` Patch "binfmt_elf: compat: avoid unused function " gregkh
2018-02-20 11:54 ` [4.4-stable 06/22] idle: i7300: add PCI dependency Arnd Bergmann
2018-02-23 16:37   ` Patch "idle: i7300: add PCI dependency" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 07/22] usb: phy: msm add regulator dependency Arnd Bergmann
2018-02-20 11:54   ` [4.4-stable,07/22] " Arnd Bergmann
2018-02-23 16:38   ` Patch "usb: phy: msm add regulator dependency" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 08/22] ncr5380: shut up gcc indentation warning Arnd Bergmann
2018-02-20 11:54   ` Arnd Bergmann
2018-02-20 22:44   ` Finn Thain
2018-02-23 16:38   ` Patch "ncr5380: shut up gcc indentation warning" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 09/22] ARM: tegra: select USB_ULPI from EHCI rather than platform Arnd Bergmann
2018-02-20 11:54   ` Arnd Bergmann
2018-02-20 11:54   ` [4.4-stable,09/22] " Arnd Bergmann
2018-02-20 11:54   ` [4.4-stable 09/22] " Arnd Bergmann
2018-02-23 16:36   ` Patch "ARM: tegra: select USB_ULPI from EHCI rather than platform" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 10/22] ASoC: Intel: Kconfig: fix build when ACPI is not enabled Arnd Bergmann
2018-02-20 11:54   ` Arnd Bergmann
2018-02-23 16:36   ` Patch "ASoC: Intel: Kconfig: fix build when ACPI is not enabled" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 11/22] netlink: fix nla_put_{u8,u16,u32} for KASAN Arnd Bergmann
2018-02-23 16:38   ` Patch "netlink: fix nla_put_{u8,u16,u32} for KASAN" has been added to the 4.4-stable tree gregkh
2018-02-20 11:54 ` [4.4-stable 12/22] virtio_balloon: prevent uninitialized variable use Arnd Bergmann
2018-02-20 11:54   ` Arnd Bergmann
2018-02-20 11:54   ` Arnd Bergmann
2018-02-20 11:55 ` [4.4-stable 13/22] dell-wmi, dell-laptop: depends DMI Arnd Bergmann
2018-02-23 16:36   ` Patch "dell-wmi, dell-laptop: depends DMI" has been added to the 4.4-stable tree gregkh
2018-02-20 11:55 ` [4.4-stable 14/22] genksyms: Fix segfault with invalid declarations Arnd Bergmann
2018-02-23 16:37   ` Patch "genksyms: Fix segfault with invalid declarations" has been added to the 4.4-stable tree gregkh
2018-02-20 11:55 ` [4.4-stable 15/22] perf/x86: Shut up false-positive -Wmaybe-uninitialized warning Arnd Bergmann
2018-02-20 11:55 ` [4.4-stable 17/22] cw1200: fix bogus maybe-uninitialized warning Arnd Bergmann
2018-02-20 11:55 ` [4.4-stable 18/22] x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug Arnd Bergmann
2018-02-23 16:39   ` Patch "x86/microcode/AMD: Change load_microcode_amd()'s param to bool to fix preemptibility bug" has been added to the 4.4-stable tree gregkh
2018-02-20 11:55 ` [4.4-stable 19/22] net: hp100: remove unnecessary #ifdefs Arnd Bergmann
2018-02-20 11:55 ` [4.4-stable 20/22] ncpfs: fix unused variable warning Arnd Bergmann
2018-02-20 11:55 ` [4.4-stable 21/22] drm/gma500: remove helper function Arnd Bergmann
2018-02-20 11:55   ` Arnd Bergmann
2018-02-23 16:36   ` Patch "drm/gma500: remove helper function" has been added to the 4.4-stable tree gregkh
2018-02-20 11:55 ` [4.4-stable 22/22] kasan: rework Kconfig settings Arnd Bergmann
2018-02-23 16:37   ` Patch "kasan: rework Kconfig settings" has been added to the 4.4-stable tree gregkh
2018-02-23 16:18 ` [4.4-stable 00/22] patches for 'randconfig' Greg KH
2018-02-20 11:55 [4.4-stable,16/22] dmaengine: zx: fix build warning Arnd Bergmann
2018-02-20 11:55 ` [4.4-stable 16/22] " Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180220115527.1806578-6-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.