From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753510AbcAKGVT (ORCPT ); Mon, 11 Jan 2016 01:21:19 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:37567 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710AbcAKGVS (ORCPT ); Mon, 11 Jan 2016 01:21:18 -0500 Date: Mon, 11 Jan 2016 06:21:14 +0000 From: Lee Jones To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jon Hunter Subject: Re: [PATCH] mfd: as3722: mark PM functions as __maybe_unused Message-ID: <20160111062114.GO3331@x1> References: <2162790.qeSmLiztNV@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2162790.qeSmLiztNV@wuerfel> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 08 Dec 2015, Arnd Bergmann wrote: > The newly introduced as3722_i2c_suspend/resume functions are built > unconditionally, but only used when power management is enabled, > so we get a warning otherwise: > > drivers/mfd/as3722.c:427:12: warning: 'as3722_i2c_suspend' defined but not used [-Wunused-function] > drivers/mfd/as3722.c:438:12: warning: 'as3722_i2c_resume' defined but not used [-Wunused-function] > > This marks them both as __maybe_unused, which avoids an ugly #ifdef > and gives us best compile-time coverage. When they are unused, the > compiler will silently drop the functions from its output. > > Signed-off-by: Arnd Bergmann > Fixes: 35deff7eb212 ("mfd: as3722: Handle interrupts on suspend") > --- > drivers/mfd/as3722.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/as3722.c b/drivers/mfd/as3722.c > index 3b21eb4bc480..e1f597f97f86 100644 > --- a/drivers/mfd/as3722.c > +++ b/drivers/mfd/as3722.c > @@ -424,7 +424,7 @@ static int as3722_i2c_remove(struct i2c_client *i2c) > return 0; > } > > -static int as3722_i2c_suspend(struct device *dev) > +static int __maybe_unused as3722_i2c_suspend(struct device *dev) > { > struct as3722 *as3722 = dev_get_drvdata(dev); > > @@ -435,7 +435,7 @@ static int as3722_i2c_suspend(struct device *dev) > return 0; > } > > -static int as3722_i2c_resume(struct device *dev) > +static int __maybe_unused as3722_i2c_resume(struct device *dev) > { > struct as3722 *as3722 = dev_get_drvdata(dev); > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog