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>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@gmail.com>,
	"David Woodhouse" <dwmw2@infradead.org>,
	linux-pm@vger.kernel.org
Subject: [4.4-stable 03/22] power: bq27xxx_battery: mark some symbols __maybe_unused
Date: Tue, 20 Feb 2018 12:54:50 +0100	[thread overview]
Message-ID: <20180220115527.1806578-4-arnd@arndb.de> (raw)
In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de>

Without the I2C driver, we get a few warnings:

drivers/power/bq27xxx_battery.c:288:12: error: 'bq27xxx_regs' defined but not used [-Werror=unused-variable]
 static u8 *bq27xxx_regs[] = {
            ^
drivers/power/bq27xxx_battery.c:994:12: error: 'bq27xxx_powersupply_init' defined but not used [-Werror=unused-function]
 static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di,
            ^
drivers/power/bq27xxx_battery.c:1029:13: error: 'bq27xxx_powersupply_unregister' defined but not used [-Werror=unused-function]
 static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di)
             ^

In mainline kernels, this was addressed by a larger rework in 703df6c09795 ("power:
bq27xxx_battery: Reorganize I2C into a module"). We probably don't want this backported
into stable kernels, so instead let's shut up the warnings by marking the symbols
as __maybe_unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/power/bq27xxx_battery.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
index 880233ce9343..6c3a447f378b 100644
--- a/drivers/power/bq27xxx_battery.c
+++ b/drivers/power/bq27xxx_battery.c
@@ -285,7 +285,7 @@ static u8 bq27421_regs[] = {
 	0x18,	/* AP		*/
 };
 
-static u8 *bq27xxx_regs[] = {
+static u8 *bq27xxx_regs[] __maybe_unused = {
 	[BQ27000] = bq27000_regs,
 	[BQ27010] = bq27010_regs,
 	[BQ27500] = bq27500_regs,
@@ -991,7 +991,7 @@ static void bq27xxx_external_power_changed(struct power_supply *psy)
 	schedule_delayed_work(&di->work, 0);
 }
 
-static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di,
+static int __maybe_unused bq27xxx_powersupply_init(struct bq27xxx_device_info *di,
 				    const char *name)
 {
 	int ret;
@@ -1026,7 +1026,7 @@ static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di,
 	return 0;
 }
 
-static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di)
+static void __maybe_unused bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di)
 {
 	/*
 	 * power_supply_unregister call bq27xxx_battery_get_property which
-- 
2.9.0

  parent reply	other threads:[~2018-02-20 11:58 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 ` Arnd Bergmann [this message]
2018-02-23 16:38   ` Patch "power: bq27xxx_battery: mark some symbols __maybe_unused" " 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 ` [4.4-stable 05/22] binfmt_elf: compat: avoid unused function warning Arnd Bergmann
2018-02-23 16:36   ` Patch "binfmt_elf: compat: avoid unused function warning" has been added to the 4.4-stable tree 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-4-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    --cc=sre@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.