Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752424AbdF0QEL (ORCPT ); Tue, 27 Jun 2017 12:04:11 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:33402 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbdF0QEF (ORCPT ); Tue, 27 Jun 2017 12:04:05 -0400 MIME-Version: 1.0 In-Reply-To: <20170627153705.1378256-1-arnd@arndb.de> References: <20170627153705.1378256-1-arnd@arndb.de> From: Guenter Roeck Date: Tue, 27 Jun 2017 09:04:03 -0700 Message-ID: Subject: Re: [PATCH] platform/chrome: cros_ec_lightbar - hide unused PM functions To: Arnd Bergmann Cc: Olof Johansson , Enric Balletbo i Serra , Guenter Roeck , Lee Jones , Jonathan Cameron , Benson Leung , Eric Caruso , Gwendal Grignou , Vincent Palatin , Jeffery Yu , Logan Gunthorpe , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 44 On Tue, Jun 27, 2017 at 8:36 AM, Arnd Bergmann wrote: > The only reference to the new functions is inside of an #ifdef, > which now causes a harmless warning when CONFIG_PM_SLEEP is not set: > > chrome/cros_ec_dev.c:478:12: error: 'ec_device_resume' defined but not used [-Werror=unused-function] > chrome/cros_ec_dev.c:469:12: error: 'ec_device_suspend' defined but not used [-Werror=unused-function] > > This marks the two functions as __maybe_unused so they can get > silently dropped by the compiler. > > Fixes: 405c84308c43 ("platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence") > Signed-off-by: Arnd Bergmann Reviewed-by: Guenter Roeck > --- > drivers/platform/chrome/cros_ec_dev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/chrome/cros_ec_dev.c b/drivers/platform/chrome/cros_ec_dev.c > index b9bf086f7569..cf6c4f0846b8 100644 > --- a/drivers/platform/chrome/cros_ec_dev.c > +++ b/drivers/platform/chrome/cros_ec_dev.c > @@ -466,7 +466,7 @@ static const struct platform_device_id cros_ec_id[] = { > }; > MODULE_DEVICE_TABLE(platform, cros_ec_id); > > -static int ec_device_suspend(struct device *dev) > +static __maybe_unused int ec_device_suspend(struct device *dev) > { > struct cros_ec_dev *ec = dev_get_drvdata(dev); > > @@ -475,7 +475,7 @@ static int ec_device_suspend(struct device *dev) > return 0; > } > > -static int ec_device_resume(struct device *dev) > +static __maybe_unused int ec_device_resume(struct device *dev) > { > struct cros_ec_dev *ec = dev_get_drvdata(dev); > > -- > 2.9.0 >