Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752454AbbBRLUW (ORCPT ); Wed, 18 Feb 2015 06:20:22 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:20664 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751649AbbBRLUU (ORCPT ); Wed, 18 Feb 2015 06:20:20 -0500 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfec7f5-b7fc86d0000066b7-05-54e474deeb83 Content-transfer-encoding: 8BIT Message-id: <54E47571.7060904@samsung.com> Date: Wed, 18 Feb 2015 12:20:17 +0100 From: Karol Wrona User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 To: Geert Uytterhoeven , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: accel: mma9551: Protect PM-only functions by #ifdef CONFIG_PM_SLEEP References: <1424256432-20808-1-git-send-email-geert@linux-m68k.org> In-reply-to: <1424256432-20808-1-git-send-email-geert@linux-m68k.org> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRmVeSWpSXmKPExsVy+t/xy7r3Sp6EGNxoE7B4dmsvk8WDplVM Frv+v2G2WDJ5PqvFvCPvWCwu75rDZvF71zF2B3aPDx/jPDat6mTzOHS4g9FjyZtDrB7nm48w enzeJBfAFsVlk5Kak1mWWqRvl8CVsbvLvmASd8WiC+9ZGhgncnYxcnJICJhI9H78zwJhi0lc uLeerYuRi0NIYCmjxNlps8ESvAKCEj8m3wOyOTiYBeQljlzKhjDVJaZMyYUo/8QocWP+P6hy LYmf+7eA2SwCqhKLH/9nBbHZgOqbdyxmBrFFBSIk5h97zQzSLCJwiFHiS98mdpAEs4C1xI31 q5hAbGGBeIm1VyeDxYUEXCR2fe0GszkFXCU2r7nNPoFRYBaS82YhnDcL4bwFjMyrGEVTS5ML ipPSc430ihNzi0vz0vWS83M3MULC/OsOxqXHrA4xCnAwKvHwLlzwKESINbGsuDIX6C4OZiUR 3vj4JyFCvCmJlVWpRfnxRaU5qcWHGJk4OKUaGP13fAgVWyvYouFZ9r+9i+nC4YUhTwKFJt+o q5a+EPShwpv95PxuxcUt/7eEMLmGzvJ5MvlkkctzkzSN29M1JjjMj+tsvam7Q2XudsN3m2y6 NzyV6jp5eK2GI+Pp7mvT4xPkdreyd35f3z6Z6UXMO7Npv9fcbPPLMJUslr296ADnTG9FJcEd d5VYijMSDbWYi4oTATme5qdRAgAA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1628 Lines: 48 On 02/18/2015 11:47 AM, Geert Uytterhoeven wrote: > If CONFIG_PM_SLEEP=n: > > drivers/iio/common/ssp_sensors/ssp_dev.c:644: warning: ‘ssp_suspend’ defined but not used > drivers/iio/common/ssp_sensors/ssp_dev.c:669: warning: ‘ssp_resume’ defined but not used > > Protect the unused functions by #ifdef CONFIG_PM_SLEEP to fix this. > > Signed-off-by: Geert Uytterhoeven > --- > drivers/iio/common/ssp_sensors/ssp_dev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c > index 52d70435f5a11c55..55a90082a29bd484 100644 > --- a/drivers/iio/common/ssp_sensors/ssp_dev.c > +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c > @@ -640,6 +640,7 @@ static int ssp_remove(struct spi_device *spi) > return 0; > } > > +#ifdef CONFIG_PM_SLEEP > static int ssp_suspend(struct device *dev) > { > int ret; > @@ -688,6 +689,7 @@ static int ssp_resume(struct device *dev) > > return 0; > } > +#endif /* CONFIG_PM_SLEEP */ > > static const struct dev_pm_ops ssp_pm_ops = { > SET_SYSTEM_SLEEP_PM_OPS(ssp_suspend, ssp_resume) > Patch is ok but commit title points to different driver. Irina would be surprised and confused to see it on the list and log. Please, use something like that: iio: common: ssp_sensors: Fix warnings ... Thanks, Karol -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/