From patchwork Tue Feb 20 11:54:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 128878 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4554017ljc; Tue, 20 Feb 2018 03:58:55 -0800 (PST) X-Google-Smtp-Source: AH8x226xKbZy0afAEKmBDAYLgKMzqcRI5U1AC3mRiRG67FBkbfOAVrWYlCXBrK2xEbSIte8MqSkm X-Received: by 10.98.70.198 with SMTP id o67mr13965427pfi.173.1519127935606; Tue, 20 Feb 2018 03:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519127935; cv=none; d=google.com; s=arc-20160816; b=jqS17QG8dGapDj/ZA0mrVcZ1EGQUtv2VH9/lsTa/x3aiLXl3QqwMTxRdkki/nh4Q28 b/LcIicoq6yQFQhoStUiYZby60CPxMsV0KtPrLUqEYbqtJQaoXhBI2mNfqb+JJGKDN/8 MJgnZnp1HlG0sjr+jC9eq4yDf/bLNJXcRb3kMcM64Ih8zy4paeBfk8CAgUtnbbMSBhfH JXlOlFOdaIoMKZoORdCHpbbLc8WGTntGD4pbz50k8kpj57BXY+TfL0UBUXKyHO/2LSgE A+UEd/2d9P6M0pGWVhepK0UeSp1LT0Qb5uCvpt7NsLMpvOEVzkkjxv7EVVD/+HFwIQEr 3RcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=TsQbhM6llL7bRy/pwFUnSs079+HvHOB8CRLe1iYWtIk=; b=ZBPGPskRwOPIDHx/vpZKxYcTsbXVzIceu7aC4xNnzQ9qofe6WdhL59uP5AD4pDdZiT gJzH9QYDjx8yU5cLR0EdtvVNrgGmPDgN7kISvUxa5aJVuT7mSUfT63mF1Izntex57GBU fC0J03NfUwlJlH/oPAfDXvfSyC26G6F6JMpw0lO+B40Ik1BO7QVYtrm4F2SUvzpNgEJC VaGV8IP/9O42oH30FutJCk5jFnR0KVO9szRfjGpXtSn8gS08rl6eQgmGNZ/EqNR8ZqQN pfQjbVOLIwegaDGeCxkWThPmXE640b3MpPyWia049KaDYUQoaRfbN1Dl3PtspDAtf318 o+YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si1422290pld.401.2018.02.20.03.58.55; Tue, 20 Feb 2018 03:58:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634AbeBTL6w (ORCPT + 28 others); Tue, 20 Feb 2018 06:58:52 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:51837 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbeBTL6I (ORCPT ); Tue, 20 Feb 2018 06:58:08 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LmLB4-1eFb5A29pK-00Ztbz; Tue, 20 Feb 2018 12:57:50 +0100 From: Arnd Bergmann To: stable@vger.kernel.org Cc: Greg KH , linux-kernel@vger.kernel.org, Arnd Bergmann , =?utf-8?q?Pali_Roh=C3=A1r?= , Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , 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 Message-Id: <20180220115527.1806578-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180220115527.1806578-1-arnd@arndb.de> References: <20180220115527.1806578-1-arnd@arndb.de> X-Provags-ID: V03:K0:Tq0dvcL5vtituVD2A19RseXktrCZb+tqGpX/7/6gkIfooUZDhNw og0Y+yK0FCXpJuKCoj6rbFeHDmGwAlIjHvS+ivfhp/gSJErAHVxPI1Yjz3wrDyPjYbtogzV x+rhY9JSBQ/OaC81cXe61eWFHvcgT30Lj67kaLJbksvLZ2pUUfktEz3alVusXnMZ1QClqFg dW+vxg7aaeYMtaM9p9Law== X-UI-Out-Filterresults: notjunk:1; V01:K0:3I55pnsjVAY=:UrBUrNuCs7yMA3NVlmd111 3dwwJuKU+21l55TaRio460GMOLtAwnvxV0nxmRIV7a2iSg5BpEhH746V3yLlklromNO2HXqwk t/eaOm39O+3+i58QBFhHMMRp3Latl5TINBol0DcDFkjjYZf4kY9mbHwSaJicF3VCO3GtqRd5h UTfLhBdCn4qfPbS58ZS/XGJKtoUkdWUdWLtYArZMgOQh1bRIqQhUQlP2ndShBtRL6FvssY7Ib 0OWHUcYH/juNuXPfGQdV2B4p5Z4pHIDE+0kxhhWKae4NcpN+piGspkldKHdrOKL3wYPD3tePd 8Jnno8PtOWNp0z/AE8UxpD32KQ2QMda7IvnNvtjm/3rHRtEuvt45Pd3sFtLD+8FL6bldnoeeu Fd+tCxylfef8hcR5zhpB6NLSkh/gtOXX7ozl9Vx7OlyN2g6/nMT0uSknH76CA7BjPb2Tgxrh5 raLJGcJxQYu00iJd2HngA6OXfO9iBNfNp5DonydaXMg4aCNFv5d1hkFRSJybwDBCui0RexT2n SwKRk3j6AQ3I/aeeLYkHE+YHNZ8eDLqi5ddM6hTYFh7KpYpIeKUMk7fagp3B48VZrLEZdwpCn 4rMS3m6c/2ONoApOz0F61oEPitMJYDaNZ3CLSbwtjRDvFXrFkK8en79BBGi5dYzXdA4VvOkrd LkZGfEaA+Au8+6RLoE31D9HK0sSgE9ZSPP4+HfxjZHCy9uvIiJC5POql1p5yT34n8bCNjNTCj ZqYteusBj4VsIEnMa38ZE+vU7tBJSduJctj7+w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/power/bq27xxx_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 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