From patchwork Wed Mar 2 15:58:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102616 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461174lbc; Wed, 2 Mar 2016 08:02:19 -0800 (PST) X-Received: by 10.66.142.132 with SMTP id rw4mr38799110pab.26.1456934539431; Wed, 02 Mar 2016 08:02:19 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id a5si19891722pat.19.2016.03.02.08.02.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:02:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9D7-0002ON-QE; Wed, 02 Mar 2016 16:01:13 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9C9-0000Se-6t for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:17 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LlpPU-1a25Pz20dU-00ZLyr; Wed, 02 Mar 2016 16:59:43 +0100 From: Arnd Bergmann To: Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH 02/14] irqchip: st: use __maybe_unused to hide st_irq_syscfg_resume Date: Wed, 2 Mar 2016 16:58:54 +0100 Message-Id: <1456934350-1389172-3-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:epQWwAJil4TWbwpg9vsVnS9/yGsNAZE6bw7mQEG7IqdyXv0wUWH h1jNKrgTo0BmOXInqvS4oWOxQfoFFy3VymyLAhDWSxrfn/YNjQ8CTYNgJx0efiyaWLjj26O gCZ5vg84yjojLdk+izIJgne/OOGu8lcNJv+SvCD94SqvVo1jVnGS5wVyUDO//7UoFVy2uEW 3yyb50YdPpUJy7/ChZYJw== X-UI-Out-Filterresults: notjunk:1; V01:K0:CdV9BZg9wuc=:CJ6sFyC/e9tRPsody+S9rr Uq3zicPihBym5Wo481B88PyQ6MTuJliqvGpdZsFzwtdPnzItyHibvFaQ+sHoZ6MBaEAmml9ME oz0DO63eVxVSKyMRXEXb05yKb4jHVFpB6veSwWACvcJ+qxgnj2b3CmMcWLoL5f3KtLCobWTrm J6MtqD+7d/GrEh32B1Pzy38h9ySTryE2yphSGhdUbidYTmcWSYCwgjWtIozc5rYmUOyUNEhox 1EKyu0FaMoSMnsw6+afy67hS3MMS1XwKOX+5972MxaK6l84GvEpLzbnf3FiQ68aolUD7sC2CK Xl9NZkCpVMn1xpDfeJJA7QN0TRzHtU04zLZEO5io4kJPLVFUdfHiHy4dkd8Xu66xZb++kvGYv MZRwpMdmw877ixN1fLqrEHmxAe1xvMn9h3mjEvPmY0LxLEWehu5RsK+gXg1SnS85jImSGnbg/ z3AiTF7Nsf8NcUswJ4JURV+QPjZJUQCA1440T6XwQwO1vME1kDDuGoe4KepTi2kujqecC+pkr 6sTYZMZJRdmyAc4OSBMSUJAF8DqrjKY2qwobTqNz0wkjM+fOtimhGdQ/jjJr9f9mv2ZZ/YxN9 JdfRipDKq4fvvdom7018sl13f/RxMI2i4OgsjvlOSAaOx8AXwZX0ygs9dD8jEP/XjmO2B6DiV 7/xdOMhJmlsa5ftOMRIUcIHmK5pxMUVWAbVGaLPgNIthcyI5hutPvOrM5fe0NO7uO/T4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080013_781290_BB848C33 X-CRM114-Status: GOOD ( 10.94 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.24 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.24 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org the st irqchip driver uses SIMPLE_DEV_PM_OPS to conditionally set its power management functions, but we get a warning about st_irq_syscfg_resume being unused when CONFIG_PM is not set: drivers/irqchip/irq-st.c:183:12: error: 'st_irq_syscfg_resume' defined but not used [-Werror=unused-function] This adds a __maybe_unused annotation so the compiler knows it can silently drop it instead of warning. Signed-off-by: Arnd Bergmann --- drivers/irqchip/irq-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c index 9af48a85c16f..5e0e250db0be 100644 --- a/drivers/irqchip/irq-st.c +++ b/drivers/irqchip/irq-st.c @@ -180,7 +180,7 @@ static int st_irq_syscfg_probe(struct platform_device *pdev) return st_irq_syscfg_enable(pdev); } -static int st_irq_syscfg_resume(struct device *dev) +static int __maybe_unused st_irq_syscfg_resume(struct device *dev) { struct st_irq_syscfg *ddata = dev_get_drvdata(dev); From patchwork Wed Mar 2 15:58:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102617 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2460936lbc; Wed, 2 Mar 2016 08:01:54 -0800 (PST) X-Received: by 10.98.11.217 with SMTP id 86mr39067429pfl.71.1456934514355; Wed, 02 Mar 2016 08:01:54 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id d80si33086765pfj.215.2016.03.02.08.01.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:01:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9Co-00028s-L4; Wed, 02 Mar 2016 16:00:54 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9C9-0000Sm-3k for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:17 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LfY1R-1a8S8C1q3t-00p3Hk; Wed, 02 Mar 2016 16:59:49 +0100 From: Arnd Bergmann To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse Subject: [PATCH 04/14] power: pm2301-charger: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:56 +0100 Message-Id: <1456934350-1389172-5-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:q/d50msHGWJEWOZCac4D+fMZLdV8699O5nrUVplAk9/qG/slgdt pGmXs+owt35nTgpYw/VXH0sbw+yvvqXHhB7rRLDITnpxEf3ua8ilHwpVldTW51eTmgkofMk aGHKeCgvcy+Btcam9WgF15l/prs91k9K+xg8BcHnXGjKRGFy5tDIi/1Heto/sA12SBmZQWT cjoawuJ5rUjQtUSGPDD+A== X-UI-Out-Filterresults: notjunk:1; V01:K0:l0AX95QIZ40=:B7/uKtRPpQXlg0l2etBh0Y tICaPtl88chp2DZJhkIxthJRKoET2G2+nDdjcer9qCh3lVn557evO2gCc/7zgIDzcKb2ex15F eY3R1ui//W5foou1aW6TrayJJrSzm0siaHkteMXR4ya2wUc/m3b3CZ/ipKlxA93+cEa2qjbVz eP54pkyrxrcxzj9CgF9i8OBC79SUeioC5VAIvqprr+g4Q1vj1mkFFxLM6AnVO1OaGL50VvdUb /smNQnNLOs8uJXNcXkPRXk44Iv+ct82LGcrMbFtioxkoAp5z31Ixw9Glqxmm4h19a8XltX15z Y3ymIuaQHawGfQWGVlZIW2de/b7B/ITNELpc2TE/TMDLb2VwrZ6hngOE9HnyM2S7lAjspJiyh DjHNd4y/TDq9WGbmQduKyIe5Hyvdxgj2oF8NEJb211Syk4SpI+rE0MyrflONG98XlujobwvRT og+bf09e+XeoxvwRhIFtbL6/q67Ankilc85FMPRB94ZGSgOhdsbUi1R9hPykD1KSG09hBHvkG B8MfjN7tbJxjXv+CYceJdss2TBZu81pHPLi6zLSJIhqahsNnwoFoq81HDv9SEmG9K0LEjd+NI UhITfrKp9TyKHToS2lVGSC/sGk6N21ak16unApo/nqSQM5HO3K4YGC8VYd2v07ZR3WNZJJouM /0lQds3Mum/JfHYxp4jisGzO+hyhKMdEhF+bz5gR29u4Ch3pSFC6qzGXq3OB+6BUVrCo= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080013_746520_FEF6EA52 X-CRM114-Status: GOOD ( 14.87 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.13 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.13 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The pm2301 charger driver uses nested #ifdefs to check for both CONFIG_PM and CONFIG_PM_SLEEP in an attempt to hide its suspend and runtime-pm operations when they are unused, but it does not hide the clear_lpn_pin() function in the same way, so we get a build warning when everything is disabled: drivers/power/pm2301_charger.c:123:13: error: 'clear_lpn_pin' defined but not used [-Werror=unused-function] This removes all the #ifdef and instead uses __maybe_unused annotations to let the compiler know it can silently drop the function definition. For the PM2XXX_PM_OPS, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann --- drivers/power/pm2301_charger.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c index 8f9bd1d0eeb6..fb62ed3fc38c 100644 --- a/drivers/power/pm2301_charger.c +++ b/drivers/power/pm2301_charger.c @@ -911,11 +911,7 @@ static struct pm2xxx_irq pm2xxx_charger_irq[] = { {"PM2XXX_IRQ_INT", pm2xxx_irq_int}, }; -#ifdef CONFIG_PM - -#ifdef CONFIG_PM_SLEEP - -static int pm2xxx_wall_charger_resume(struct device *dev) +static int __maybe_unused pm2xxx_wall_charger_resume(struct device *dev) { struct i2c_client *i2c_client = to_i2c_client(dev); struct pm2xxx_charger *pm2; @@ -931,7 +927,7 @@ static int pm2xxx_wall_charger_resume(struct device *dev) return 0; } -static int pm2xxx_wall_charger_suspend(struct device *dev) +static int __maybe_unused pm2xxx_wall_charger_suspend(struct device *dev) { struct i2c_client *i2c_client = to_i2c_client(dev); struct pm2xxx_charger *pm2; @@ -949,9 +945,7 @@ static int pm2xxx_wall_charger_suspend(struct device *dev) return 0; } -#endif - -static int pm2xxx_runtime_suspend(struct device *dev) +static int __maybe_unused pm2xxx_runtime_suspend(struct device *dev) { struct i2c_client *pm2xxx_i2c_client = to_i2c_client(dev); struct pm2xxx_charger *pm2; @@ -962,7 +956,7 @@ static int pm2xxx_runtime_suspend(struct device *dev) return 0; } -static int pm2xxx_runtime_resume(struct device *dev) +static int __maybe_unused pm2xxx_runtime_resume(struct device *dev) { struct i2c_client *pm2xxx_i2c_client = to_i2c_client(dev); struct pm2xxx_charger *pm2; @@ -975,15 +969,11 @@ static int pm2xxx_runtime_resume(struct device *dev) return 0; } -static const struct dev_pm_ops pm2xxx_pm_ops = { +static const struct dev_pm_ops pm2xxx_pm_ops __maybe_unused = { SET_SYSTEM_SLEEP_PM_OPS(pm2xxx_wall_charger_suspend, pm2xxx_wall_charger_resume) SET_RUNTIME_PM_OPS(pm2xxx_runtime_suspend, pm2xxx_runtime_resume, NULL) }; -#define PM2XXX_PM_OPS (&pm2xxx_pm_ops) -#else -#define PM2XXX_PM_OPS NULL -#endif static int pm2xxx_wall_charger_probe(struct i2c_client *i2c_client, const struct i2c_device_id *id) @@ -1244,7 +1234,7 @@ static struct i2c_driver pm2xxx_charger_driver = { .remove = pm2xxx_wall_charger_remove, .driver = { .name = "pm2xxx-wall_charger", - .pm = PM2XXX_PM_OPS, + .pm = IS_ENABLED(CONFIG_PM) ? &pm2xxx_pm_ops : NULL, }, .id_table = pm2xxx_id, }; From patchwork Wed Mar 2 15:58:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102619 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2460773lbc; Wed, 2 Mar 2016 08:01:38 -0800 (PST) X-Received: by 10.98.34.205 with SMTP id p74mr16349602pfj.93.1456934497969; Wed, 02 Mar 2016 08:01:37 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f88si58938264pfj.136.2016.03.02.08.01.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:01:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9Cb-0001zk-03; Wed, 02 Mar 2016 16:00:41 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9C8-0000TC-EH for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:13 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MTveb-1aSAsT1Svh-00QnCy; Wed, 02 Mar 2016 16:59:52 +0100 From: Arnd Bergmann To: Lee Jones Subject: [PATCH 05/14] mfd: ipaq-micro: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:57 +0100 Message-Id: <1456934350-1389172-6-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:VBU9QBwmf2HHyFflclQhqHsxMmoxGEyqdTvVfe2W9kSgBY3wCYY 61MYS2lBoQrsZ/5bmXTQA3OmcE5tPLnlIjJMDb6DFZI0a4RrFDLQNAcbIeDShvcI8xASa6C LWclqZ4CYya5sb3LMPDZ1v57XXNpuFlMSNdhNWjZR/9EKrMpPzwb9G4SM1n5BYYEVsnahZr kWbyX32I0gqPfunvGZvDA== X-UI-Out-Filterresults: notjunk:1; V01:K0:U8qcpK5hzr0=:VNSx4gcGXDVQLZWQ4wnMjm 7R3M4S0aszYBbVXyR1IYf4N4BFsbKnGhF6bH9JYpvDJdtZwzjJ9NY1lVKLqGeQh3UMpxHCIeB H044UQy1zny/aDFIbuDUdEsQAOAjAgX4i9zNmpTW/XcZrLReN792jvN23rtxbSceQsve8bo2r OS/pGwHUGL9lR9sZAwHA6N51EbdL8v4BrGcSZPybUvfzatHH/8oflll0fP4S2tkU07xev20Yj dK7j9ZwsxBapQm8sDEbifGgcy5XxTZoTAQRfp4dXphIgmV3asSBwrSIULDQxkN7MnRyeZ+Xvl MoydTbCeESRlJkfTvAs6aVEr4X/1DDIaAy9gQq0MfcFzAl/DxT2F2feyOQfzJSUXwMCzDSvad i190lv8KWMvbw6oADYE7LAKJg6YZp2R0/XZ59g9TUFSAskmXi+QlUJJ2EokuwcHUJhS1Fo2mc vJ82NzIju3YhkW6npGZu4zRd+XjrekhEAzq3IqOYo1iX29iRQUyPxn4AueMfnWS+wO8sBLXFF 5S/SEkS7mBC8VGZzoFg/NRWe+M6QeOOdHjl7fZ02m7ljOSrYxYuL+/jietIKUetsDXHaF0Uzv eruzfhGavde3SyUg7reuWPmI8gB1Wo459QZlc34MSabXXPjzaQ24vUXHzaWMI/tHWMpN87Jzn s07EEyDPz01J6BC6VmHecFD+BFkCFhKzao/HFHFLmnb+7JHe6yGIhxpQbEMLseJpptxI= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080012_937310_53351DDF X-CRM114-Status: GOOD ( 11.61 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The ipaq-micro driver uses SET_SYSTEM_SLEEP_PM_OPS() to remove the reference to its resume function, but does not use an #ifdef around the definition, so we get a build warning: drivers/mfd/ipaq-micro.c:379:12: error: 'micro_resume' defined but not used [-Werror=unused-function] This adds a __maybe_unused annotation so the compiler knows it can silently drop it instead of warning. Signed-off-by: Arnd Bergmann --- drivers/mfd/ipaq-micro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c index a41859c55bda..df16fd1df68b 100644 --- a/drivers/mfd/ipaq-micro.c +++ b/drivers/mfd/ipaq-micro.c @@ -376,7 +376,7 @@ static const struct mfd_cell micro_cells[] = { { .name = "ipaq-micro-leds", }, }; -static int micro_resume(struct device *dev) +static int __maybe_unused micro_resume(struct device *dev) { struct ipaq_micro *micro = dev_get_drvdata(dev); From patchwork Wed Mar 2 15:58:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102615 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461325lbc; Wed, 2 Mar 2016 08:02:33 -0800 (PST) X-Received: by 10.66.167.237 with SMTP id zr13mr40126919pab.85.1456934551983; Wed, 02 Mar 2016 08:02:31 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id t63si58972114pfi.53.2016.03.02.08.02.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:02:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9DM-0002cB-Qg; Wed, 02 Mar 2016 16:01:28 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CD-0000V4-HF for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:22 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LpQRR-1ZwK7j3J9p-00f78e; Wed, 02 Mar 2016 16:59:54 +0100 From: Arnd Bergmann To: Vinod Koul , Barry Song Subject: [PATCH 06/14] dma: sirf: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:58 +0100 Message-Id: <1456934350-1389172-7-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:+vEKs4wFgAof4ObNo6aHKO/qoBDRDUEjd77J6HLmqODZYN/x/54 0dGNyvbUqiKXILl4c6jAlRdM7cRp5SZFWGZtBVbfu4upHQdKRyW0ndz56TnAVs3sA6k226o VDpgbvKCBLSC52EptmlFmYCdW3ax+/G6FqjdA7N5C3Y+0CSw3hK/mX50XkVJhSJOg0dibBD XY1rwaOvKbf88bqmzqBbA== X-UI-Out-Filterresults: notjunk:1; V01:K0:x2G3ud8xMfw=:9DztB+jj3KeHEhraEg5wzf qtRj6T/S6+ynQLL9V1oVnmzWHP9YVD2vMqgzFCiJAG41NrEWsWD2H5iqgTwtm3iUbRNdaGEQE I+AaRIfsGKMd2LfUlebUW/43grVMnPMd1XPlIT90H07Rk0shSSMKHnZzGLUliu1AWmsvxmmaE MUu8GnACw5aKsup1QOQgYFNm8ae06tBm1ZU819t8yqu1PQFzKD+xMI5Jat689ao1DWSKXxuBA LjncpFmAvKeZaAai/UKr4h5RER1iB+KyMHaa5K+lhY5xR5fWcmzxIHNeoSbm6GkX5eXh+fa2p 9GFRyyn5o4yQ1cqBhjriGgEmU7tZItBrTsaYApFYWw/Gqv3qTweOhEx5bekPTNmEiXcjrqdGW 27rfkg4Xo/LMxvxjcvDYeePkTO7Er/0IGMMwjOusjW8Ur8LqsBV2lbDmQ74muHmw8HEd0hHCy tn5WAn1Ox+wK4mbocCh5rIICy5vh1sQNreXnPalpAcLvkQFo5JqtBNHRDkUUYsVqGbsaCx3jl 7WepN7dgnpwm9nMnXhvnLlcJuzs5ePMXnBsGry3gbN4xWbhxWfPGrMxhmZBbIv8I/6jBcZsDF mX4IRt0nOMYh9Z0ml8txuqYvSftHVva5Qe2ihVloObXz+C7dtmVFNqgLaat5mWQQgrBpWd3rw rzgennTgeS+5EBfC1/gC7dAYp7+u73CPmtKhBeKwi6PBGON1ieN3UlVGChwRE/2OO2rc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080018_024171_86AD788E X-CRM114-Status: GOOD ( 12.48 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dmaengine@vger.kernel.org, Dan Williams , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The sirf dma driver uses #ifdef to check for CONFIG_PM_SLEEP for its suspend/resume code but then has no #ifdef for the respective runtime PM code, so we get a warning if CONFIG_PM is disabled altogether: drivers/dma/sirf-dma.c:1000:12: error: 'sirfsoc_dma_runtime_resume' defined but not used [-Werror=unused-function] This removes the existing #ifdef and instead uses __maybe_unused annotations for all four functions to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/dma/sirf-dma.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 22ea2419ee56..e48350e65089 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -989,7 +989,7 @@ static int sirfsoc_dma_remove(struct platform_device *op) return 0; } -static int sirfsoc_dma_runtime_suspend(struct device *dev) +static int __maybe_unused sirfsoc_dma_runtime_suspend(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); @@ -997,7 +997,7 @@ static int sirfsoc_dma_runtime_suspend(struct device *dev) return 0; } -static int sirfsoc_dma_runtime_resume(struct device *dev) +static int __maybe_unused sirfsoc_dma_runtime_resume(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); int ret; @@ -1010,8 +1010,7 @@ static int sirfsoc_dma_runtime_resume(struct device *dev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int sirfsoc_dma_pm_suspend(struct device *dev) +static int __maybe_unused sirfsoc_dma_pm_suspend(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); struct sirfsoc_dma_regs *save = &sdma->regs_save; @@ -1062,7 +1061,7 @@ static int sirfsoc_dma_pm_suspend(struct device *dev) return 0; } -static int sirfsoc_dma_pm_resume(struct device *dev) +static int __maybe_unused sirfsoc_dma_pm_resume(struct device *dev) { struct sirfsoc_dma *sdma = dev_get_drvdata(dev); struct sirfsoc_dma_regs *save = &sdma->regs_save; @@ -1121,7 +1120,6 @@ static int sirfsoc_dma_pm_resume(struct device *dev) return 0; } -#endif static const struct dev_pm_ops sirfsoc_dma_pm_ops = { SET_RUNTIME_PM_OPS(sirfsoc_dma_runtime_suspend, sirfsoc_dma_runtime_resume, NULL) From patchwork Wed Mar 2 15:58:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102611 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2462085lbc; Wed, 2 Mar 2016 08:03:48 -0800 (PST) X-Received: by 10.98.1.197 with SMTP id 188mr39753272pfb.8.1456934628705; Wed, 02 Mar 2016 08:03:48 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ll1si36059180pab.144.2016.03.02.08.03.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:03:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9EU-0003mQ-QH; Wed, 02 Mar 2016 16:02:38 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CZ-0001Le-48 for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:41 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0M1QSH-1ZmTW60obB-00tVGC; Wed, 02 Mar 2016 17:00:03 +0100 From: Arnd Bergmann To: Matt Mackall , Herbert Xu , Kukjin Kim , Krzysztof Kozlowski Subject: [PATCH 07/14] hw_random: exynos: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:58:59 +0100 Message-Id: <1456934350-1389172-8-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:tebVe36ilacPLx/VE6A2BkCsNsUw8GFlvi/Dak6IS/37f+D6r5J klGKDhGiRxKygafT7SXBbw/XXwSkmdX50SNPoKSpOa3h8P0sArUyV3BH0Qs+2pqBNZeXxFf l1UxaRkIEWKr3S2810hM8paZtkdJv0PZyxiG0dFEFAhLp3OQ2KSjNz9g14FE6rwjCDK5HeY 42OsAl4LY8IjKePa8dYtw== X-UI-Out-Filterresults: notjunk:1; V01:K0:M+OB3geWSnI=:cRwl4ua7NIJ4sNJ0Ri4gaz cD7rvFiujmhcTBc+OTlZXM3EjiYeOPXpmV74aZcZMsfDlLZ99CXAT9DGSB7Mxzd/LlDN4UZ2L NjZFLfiErJqXEGFIhHIbxcYNADDX2Wye+exAf6SUP7iF6lH3zNm18dIsQc5jgdXhwavh6A30I tR1yXcI4sB8eP8Nzo6T8+ZAoahLMUlPdhK84hy60pf53grj9QunEicK+venv7NsOha8hE1+Kb G6hT1iGPsblStozT1x7p7XNj9LWlVtWCgS5UxmkWwd0id2pZ7tMRKAgsa6Sm+tgUParcj40X0 bINHNlCuZ9gTqNSkU98mPcpw21mhm1iUJrQo4vyLnNPWmm/26/TfpZuuytcDlE9AnRlDs4khG Gj2rbDp2hn1WWVQCoakkEIMnudUQjXIVPde0XLWDe3LttpH14v8Zfat95MsdVsF8S+Eq1H0vK dAqiUo1U8zRBaLTJvm4GF4DX+X2W9FjouvkUlAsiA+PjBu8j1sZFeptJkV8rqndBkKQY4ZE2G O21tUikvpvJr96vHjBvlqRrOOf9d/Vwwh01ig5stih4pQb50L4AiOUWmwicJdM1EHl8v5uB72 tYZG/ee+YDCvdVsvUY5Rx4NdwLgmULrV+9dLKvOWZuYrChq5AEyM8oB6reDP1H5J5Oqenu4hC jJZDmt2nxWVTtuBleBfQCdxmV+limC0WLCtcVIY2TbtENtBtfi441T3N1PXUc2QVWoCU= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080039_626493_91C2F521 X-CRM114-Status: GOOD ( 12.36 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [217.72.192.75 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [217.72.192.75 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Thompson , linux-samsung-soc@vger.kernel.org, Arnd Bergmann , Dmitry Torokhov , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The exynos random driver uses #ifdef to check for CONFIG_PM, but then uses SIMPLE_DEV_PM_OPS, which leaves the references out when CONFIG_PM_SLEEP is not defined, so we get a warning with PM=y && PM_SLEEP=n: drivers/char/hw_random/exynos-rng.c:166:12: error: 'exynos_rng_suspend' defined but not used [-Werror=unused-function] drivers/char/hw_random/exynos-rng.c:171:12: error: 'exynos_rng_resume' defined but not used [-Werror=unused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/char/hw_random/exynos-rng.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index 30cf4623184f..ada081232528 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -144,8 +144,7 @@ static int exynos_rng_probe(struct platform_device *pdev) return devm_hwrng_register(&pdev->dev, &exynos_rng->rng); } -#ifdef CONFIG_PM -static int exynos_rng_runtime_suspend(struct device *dev) +static int __maybe_unused exynos_rng_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -155,7 +154,7 @@ static int exynos_rng_runtime_suspend(struct device *dev) return 0; } -static int exynos_rng_runtime_resume(struct device *dev) +static int __maybe_unused exynos_rng_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -163,12 +162,12 @@ static int exynos_rng_runtime_resume(struct device *dev) return clk_prepare_enable(exynos_rng->clk); } -static int exynos_rng_suspend(struct device *dev) +static int __maybe_unused exynos_rng_suspend(struct device *dev) { return pm_runtime_force_suspend(dev); } -static int exynos_rng_resume(struct device *dev) +static int __maybe_unused exynos_rng_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct exynos_rng *exynos_rng = platform_get_drvdata(pdev); @@ -180,7 +179,6 @@ static int exynos_rng_resume(struct device *dev) return exynos_rng_configure(exynos_rng); } -#endif static const struct dev_pm_ops exynos_rng_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(exynos_rng_suspend, exynos_rng_resume) From patchwork Wed Mar 2 15:59:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102613 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461563lbc; Wed, 2 Mar 2016 08:02:55 -0800 (PST) X-Received: by 10.66.249.41 with SMTP id yr9mr39833381pac.86.1456934575182; Wed, 02 Mar 2016 08:02:55 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id k25si18457729pfb.67.2016.03.02.08.02.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:02:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9Dj-0002zD-Mi; Wed, 02 Mar 2016 16:01:51 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CX-0001GD-3Z for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:38 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0LphYc-1Zw35S4BMs-00fOO7; Wed, 02 Mar 2016 17:00:09 +0100 From: Arnd Bergmann To: "James E.J. Bottomley" , "Martin K. Petersen" Subject: [PATCH 08/14] scsi: mvumi: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:59:00 +0100 Message-Id: <1456934350-1389172-9-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:ckAxWj8Hne7GUcXwKiC0efVCzRmCcLZGCvPVWYb4MPB5UCnTVi/ 7WdXF8onOFoQKHH5sIwMFbd4ksV51JrU28oj2PTjwr6QiwzwD0NtM6wJhOR144lV7I+UIiT nZb6HNR4jNaHP2eme4pHKEdpR73asHk7zSthRattaURLQKQt59x6ENG1A22sG/nN8/uBMeJ BPPMNkXVQTU7e5v08Qj0Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:HVSSbAXgfcU=:STgQ5bGBkTXfWhf6ducP+a x1H6WMj5kJyO+z+YXP12uM3CSP52iS6/Qih0a3fkGq0qf2oSNX9Hu2knGNgNrcppify0lEjzp ODBRAGf7o9zn8JFuLj0YEI9HyIjcRCGmUU/C3Xvu5EtJJs4t7EucQFDxKhFuV5P0TOX0WM5FC fQnZFBU8iAPLoAbrFy+UvRiEZ7kj4x0BuNyfE/5mKYytc3Nz4LhjpoJZyx+j6hR1FbGYDtiMC 124iKugvBdatTxyh/jkX3byeb5vH71A+iiPqQCEo5hGbnZQVL+UrzzKSOBsPfPmdpOlNUh5Xu IF9x63zQG1aaF9bB9MtCLocpYPPNyfhj/CaZWRXTT4QGfv1oDeB0sKaWmx24KIDTzOCAQz2CP ViuBD/wiE3rN7/kF+yctm20qGvkHDVkfBNtV4ST4e1I49q3kYqYDTZAzxrAsrXXlex9J/Y1Jx lA7pC3sA7N2VSZ8gO7F0r0rMQeENu/kqYi5bCfxyz4xBuixJcBdCgGLXVLN+e6pNOZaX2E4nx saUQRyGEMpTgtPBlZATDRLTxnO2oios47MHLwd325l+LSTu4/36fhoX1XtYeKGOAt10b+P3oP YWlvlP7FpF6UOg3TlQwEISJpbKA4wndpxmb03xJf+hM7+HhlBnsOhHm9S1kIDBS3T703Ss2Qb wJl+F3voUVPgxeuc8rQBkYAlqlVIZZkedYMFjGgUSYz9vXfQoLm8cWsBjm0PTi0qQ/GI= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080037_701325_25EF68B2 X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.24 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.24 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The mvumi scsi hides the references to its suspend/resume functions in an #ifdef but does not hide the implementation the same way: drivers/scsi/mvumi.c:2632:12: error: 'mvumi_suspend' defined but not used [-Werror=unused-function] drivers/scsi/mvumi.c:2651:12: error: 'mvumi_resume' defined but not used [-Werror=unused-function] This adds __maybe_unused annotations so the compiler knows it can silently drop them instead of warning, while avoiding the addition of another #ifdef. Signed-off-by: Arnd Bergmann --- drivers/scsi/mvumi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 02360de6b7e0..39285070f3b5 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c @@ -2629,7 +2629,7 @@ static void mvumi_shutdown(struct pci_dev *pdev) mvumi_flush_cache(mhba); } -static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state) +static int __maybe_unused mvumi_suspend(struct pci_dev *pdev, pm_message_t state) { struct mvumi_hba *mhba = NULL; @@ -2648,7 +2648,7 @@ static int mvumi_suspend(struct pci_dev *pdev, pm_message_t state) return 0; } -static int mvumi_resume(struct pci_dev *pdev) +static int __maybe_unused mvumi_resume(struct pci_dev *pdev) { int ret; struct mvumi_hba *mhba = NULL; From patchwork Wed Mar 2 15:59:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102612 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2461759lbc; Wed, 2 Mar 2016 08:03:14 -0800 (PST) X-Received: by 10.66.120.202 with SMTP id le10mr39064437pab.155.1456934594793; Wed, 02 Mar 2016 08:03:14 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s8si5398984pfi.10.2016.03.02.08.03.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Mar 2016 08:03:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9E2-0003JY-MX; Wed, 02 Mar 2016 16:02:10 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ab9CY-0001LL-GS for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2016 16:00:40 +0000 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0M95x7-1aknJL0eMv-00CRDY; Wed, 02 Mar 2016 17:00:14 +0100 From: Arnd Bergmann To: Tom Lendacky Subject: [PATCH 09/14] amd-xgbe: use __maybe_unused to hide pm functions Date: Wed, 2 Mar 2016 16:59:01 +0100 Message-Id: <1456934350-1389172-10-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:P6KZ3jWJ+LNFemDBQyCYeSDTb2eF7bS/OJBLogWwupM5PVJgU9Y JZPimBNnxm2MAdCHMY6ygMlUTLKP2BEq+ZCArZyHN7iR8CfU+dYAoXqnrvAXJfXZLxr1VKP 7c2c7lsObPJ5XtQmMNDn5wHfQVIOq634mMFilzW85thSrX6Z65WGTkbECAyU4A07RNxf5Ka e3y/GQitWV0uGzwY/2vHA== X-UI-Out-Filterresults: notjunk:1; V01:K0:R1JB3BnUuGI=:f+o25f3JxnRP8wV9OmGAhI zoGFw3aKJVETzsZSiR40RGHsIxth0tMLTAVL3JMwXaktUpo5UMDH6stBYBccaYr1/HTS/Yqx/ XZEM2wbNnKFLL0xeu90QDm8jbjPyK4vx/Tj9dZYjcSLcTOhiN6WuU8hceercPjdKm4QoLao9J oW8hggIVFjRBljzgAPWMPHXBZGcQ5+uhCJsf4XTXDsXKWb8AgowWLIQ1oI8SAXYhhTxIDmiU3 27EUFY2pihWvBvsyJdpnznQ8LGAUKB972CJEz1oBVlYTz0qJuZB5Z9bYz+qQsEYRctvsixLyA Ydl87JBS8VEyYootgdCof7RYPMX8Y4wm8a89mKF7Q8XYe3pp56vYPreFCFaCUL1MpKoWPozLv 2R6qbKjEyke4+4Cf2piP67i3ll5Xnsx2ImR5BrXvIK6wGBpP8wa+wBmrovP6P6XjD61rp+BdK 5Q4W6xPkgM2RNmH1sKPkIq3jRXQFvzWbXcy51sTwJYGDuh97ieb8ds3tUbLM0KYfHw7wk9Ixo LgE6jvrTQxqsDxIyJTehIMUi6GIztS0H4zeCZSwjrAioI4ej0UpOhofjcOpSJk5gP+dguMw1B PfQaewIKQ7WhgDYU1qtzWJTrBqZZ68dwxrMYeLrlO5Rd3PG8vLJU58Xwl3YX2MMr1GMlFMG7J R/AH1nBgAjguMlurAojUrOaF4R3wYw44oz1bljzjI1gn4edQuZjqpvASw9BRPi1g3Hc0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160302_080039_182283_B94C4158 X-CRM114-Status: GOOD ( 13.50 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The amd-xgbe ethernet driver hides its suspend/resume functions in #ifdef CONFIG_PM, but uses SIMPLE_DEV_PM_OPS() to make the reference conditional on CONFIG_PM_SLEEP, which results in a warning when PM_SLEEP is not set but PM is: drivers/net/ethernet/amd/xgbe/xgbe-main.c:833:12: warning: 'xgbe_suspend' defined but not used [-Wunused-function] drivers/net/ethernet/amd/xgbe/xgbe-main.c:853:12: warning: 'xgbe_resume' defined but not used [-Wunused-function] This removes the incorrect #ifdef and instead uses a __maybe_unused annotation to let the compiler know it can silently drop the function definition. Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/amd/xgbe/xgbe-main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.7.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index 3eee3201b58f..a86f32106639 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c @@ -829,8 +829,7 @@ static int xgbe_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int xgbe_suspend(struct device *dev) +static int __maybe_unused xgbe_suspend(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct xgbe_prv_data *pdata = netdev_priv(netdev); @@ -850,7 +849,7 @@ static int xgbe_suspend(struct device *dev) return ret; } -static int xgbe_resume(struct device *dev) +static int __maybe_unused xgbe_resume(struct device *dev) { struct net_device *netdev = dev_get_drvdata(dev); struct xgbe_prv_data *pdata = netdev_priv(netdev); @@ -868,7 +867,6 @@ static int xgbe_resume(struct device *dev) return ret; } -#endif /* CONFIG_PM */ #ifdef CONFIG_ACPI static const struct acpi_device_id xgbe_acpi_match[] = {