From patchwork Wed Mar 2 15:58:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102622 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2460419lbc; Wed, 2 Mar 2016 08:01:02 -0800 (PST) X-Received: by 10.66.233.194 with SMTP id ty2mr39043109pac.126.1456934461552; Wed, 02 Mar 2016 08:01:01 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si58979015pfa.129.2016.03.02.08.01.01; Wed, 02 Mar 2016 08:01:01 -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 S932130AbcCBQAv (ORCPT + 30 others); Wed, 2 Mar 2016 11:00:51 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:52800 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755070AbcCBQAq (ORCPT ); Wed, 2 Mar 2016 11:00:46 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LmNdq-1a1XSC2NkI-00ZuDD; Wed, 02 Mar 2016 16:59:46 +0100 From: Arnd Bergmann To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/14] power: ipaq-micro-battery: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:55 +0100 Message-Id: <1456934350-1389172-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456934350-1389172-1-git-send-email-arnd@arndb.de> References: <1456934350-1389172-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:9q0TQVdWAXmQ+WcgleRqY3bgCpM1ckmFJkLDZtzCmGsKcWPLniu Vx2qYMzUdxIF+tNjdyPkiMdbuPmadM+KwnOYt37txpuHWwrKKgDn6y+ZSfwxc6YKd99OPPh ZL58shI2env8roSbw79NPhmQ2fNemn3cF07xNwxss/vpYH75Zth+BVrhNBm1kifmTQdRhir KTVS/n7h88fbwg8RL2Rbg== X-UI-Out-Filterresults: notjunk:1; V01:K0:LjlzcNQI8PU=:H6X/lg787c8KXVqVSaXWnD SmWa2qZSuEc5XUPpkaSwXQyVozEUHEti9WcyIBBWt8DEpffasPS9kzkzZJgAse50Ixx5KbCVb oSaaUDvzqk/QhuJRtBbOaF7E+vENXDoirX5qRrPcl8ijVJ+y1X2hJo2+9y+VxQi/AyA8igYtS MqjPPwlM8jmGiYrA+EJVP0XIpcv/79ogXGgw2NIpsZbFfjZuB7BTSMoyRw87emf6md2NvIusT R9e/aKRpgDWClHy7wR4A+SFzJbkrPuvprpNLc717o9+AVcyV/trGigGynQ+AQsvO/ckLCWhKf WombwPW5MNiS5hRKvmL87pw+OIncv1r2U5NBHvkFDWtueI5ZsicPNKzObxufH4Wf/DpnJadab HO9X6CA4VONpE1Yn8WPde7aPhdSkKp3p6YY+/S54WMsqI4Mx5Ef2n3jSPKWZTSd5nJ64UYE4p fI9Sngp+uL+Av1hQNgzObaLhFKiMFyiNVsSL6ZrV3kK3f69ACO/Mw0wlo+nL9nunAqPD62e1S DVV3oh1SM4IR8N+VUPeryBSZJ+OvYf6TdGWjZQe21FoB18u6cPJK6ha+t0X0XIqRFKr9KOjUY GQyFw5HxGrZLTjqNQHasNHix7xeZ9TPeP8UjV2q7eIlpNckqCj7g59M9kD4Karx7wJktngSRA VD3gyvEPC+gVyKFCGnZWuYpKDuJLddBHsBY+k0lr0tnGpBAiwvFZDtwRygDhY2MB+hKA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ipaq micro battery driver has suspend/resume functions that are accessed using SIMPLE_DEV_PM_OPS, which hide the reference when CONFIG_PM_SLEEP is not set, resulting in a warning about unused functions: drivers/power/ipaq_micro_battery.c:284:12: error: 'micro_batt_suspend' defined but not used [-Werror=unused-function] drivers/power/ipaq_micro_battery.c:292:12: error: 'micro_batt_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/power/ipaq_micro_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 diff --git a/drivers/power/ipaq_micro_battery.c b/drivers/power/ipaq_micro_battery.c index f03014ea1dc4..3f314b1a30d7 100644 --- a/drivers/power/ipaq_micro_battery.c +++ b/drivers/power/ipaq_micro_battery.c @@ -281,7 +281,7 @@ static int micro_batt_remove(struct platform_device *pdev) return 0; } -static int micro_batt_suspend(struct device *dev) +static int __maybe_unused micro_batt_suspend(struct device *dev) { struct micro_battery *mb = dev_get_drvdata(dev); @@ -289,7 +289,7 @@ static int micro_batt_suspend(struct device *dev) return 0; } -static int micro_batt_resume(struct device *dev) +static int __maybe_unused micro_batt_resume(struct device *dev) { struct micro_battery *mb = dev_get_drvdata(dev);