All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Frank Li <frank.li@nxp.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Shawn Guo <shawnguo@kernel.org>,
	"b38343@freescale.com" <b38343@freescale.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Frank Li <Frank.Li@freescale.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions
Date: Wed, 2 Mar 2016 09:12:38 -0800	[thread overview]
Message-ID: <20160302171238.GA4318@dtor-ws> (raw)
In-Reply-To: <AMSPR04MB263BDF6CE19C8B5432ECAE588BC0@AMSPR04MB263.eurprd04.prod.outlook.com>

On Wed, Mar 02, 2016 at 04:04:46PM +0000, Frank Li wrote:
> 
> 
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd@arndb.de]
> > Sent: Wednesday, March 02, 2016 9:59 AM
> > To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: linux-arm-kernel@lists.infradead.org; Arnd Bergmann <arnd@arndb.de>;
> > Shawn Guo <shawnguo@kernel.org>; b38343@freescale.com; Javier
> > Martinez Canillas <javier@osg.samsung.com>; Frank Li
> > <Frank.Li@freescale.com>; linux-input@vger.kernel.org; linux-
> > kernel@vger.kernel.org
> > Subject: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide
> > pm functions
> > 
> > The SNVS power key 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/input/keyboard/snvs_pwrkey.c:183:12: error:
> > 'imx_snvs_pwrkey_suspend' defined but not used [-Werror=unused-function]
> > drivers/input/keyboard/snvs_pwrkey.c:194:12: error:
> > 'imx_snvs_pwrkey_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 <arnd@arndb.de>
> 
> Acked-by: Frank Li <Frank.Li@nxp.com>

Applied, thank you.

> 
> > ---
> >  drivers/input/keyboard/snvs_pwrkey.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/input/keyboard/snvs_pwrkey.c
> > b/drivers/input/keyboard/snvs_pwrkey.c
> > index 9adf13a5864a..b0ffadeb208c 100644
> > --- a/drivers/input/keyboard/snvs_pwrkey.c
> > +++ b/drivers/input/keyboard/snvs_pwrkey.c
> > @@ -180,7 +180,7 @@ static int imx_snvs_pwrkey_probe(struct
> > platform_device *pdev)
> >  	return 0;
> >  }
> > 
> > -static int imx_snvs_pwrkey_suspend(struct device *dev)
> > +static int __maybe_unused imx_snvs_pwrkey_suspend(struct device *dev)
> >  {
> >  	struct platform_device *pdev = to_platform_device(dev);
> >  	struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); @@ -
> > 191,7 +191,7 @@ static int imx_snvs_pwrkey_suspend(struct device *dev)
> >  	return 0;
> >  }
> > 
> > -static int imx_snvs_pwrkey_resume(struct device *dev)
> > +static int __maybe_unused imx_snvs_pwrkey_resume(struct device *dev)
> >  {
> >  	struct platform_device *pdev = to_platform_device(dev);
> >  	struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev);
> > --
> > 2.7.0
> 

-- 
Dmitry

WARNING: multiple messages have this Message-ID (diff)
From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide pm functions
Date: Wed, 2 Mar 2016 09:12:38 -0800	[thread overview]
Message-ID: <20160302171238.GA4318@dtor-ws> (raw)
In-Reply-To: <AMSPR04MB263BDF6CE19C8B5432ECAE588BC0@AMSPR04MB263.eurprd04.prod.outlook.com>

On Wed, Mar 02, 2016 at 04:04:46PM +0000, Frank Li wrote:
> 
> 
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd at arndb.de]
> > Sent: Wednesday, March 02, 2016 9:59 AM
> > To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > Cc: linux-arm-kernel at lists.infradead.org; Arnd Bergmann <arnd@arndb.de>;
> > Shawn Guo <shawnguo@kernel.org>; b38343 at freescale.com; Javier
> > Martinez Canillas <javier@osg.samsung.com>; Frank Li
> > <Frank.Li@freescale.com>; linux-input at vger.kernel.org; linux-
> > kernel at vger.kernel.org
> > Subject: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide
> > pm functions
> > 
> > The SNVS power key 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/input/keyboard/snvs_pwrkey.c:183:12: error:
> > 'imx_snvs_pwrkey_suspend' defined but not used [-Werror=unused-function]
> > drivers/input/keyboard/snvs_pwrkey.c:194:12: error:
> > 'imx_snvs_pwrkey_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 <arnd@arndb.de>
> 
> Acked-by: Frank Li <Frank.Li@nxp.com>

Applied, thank you.

> 
> > ---
> >  drivers/input/keyboard/snvs_pwrkey.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/input/keyboard/snvs_pwrkey.c
> > b/drivers/input/keyboard/snvs_pwrkey.c
> > index 9adf13a5864a..b0ffadeb208c 100644
> > --- a/drivers/input/keyboard/snvs_pwrkey.c
> > +++ b/drivers/input/keyboard/snvs_pwrkey.c
> > @@ -180,7 +180,7 @@ static int imx_snvs_pwrkey_probe(struct
> > platform_device *pdev)
> >  	return 0;
> >  }
> > 
> > -static int imx_snvs_pwrkey_suspend(struct device *dev)
> > +static int __maybe_unused imx_snvs_pwrkey_suspend(struct device *dev)
> >  {
> >  	struct platform_device *pdev = to_platform_device(dev);
> >  	struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev); @@ -
> > 191,7 +191,7 @@ static int imx_snvs_pwrkey_suspend(struct device *dev)
> >  	return 0;
> >  }
> > 
> > -static int imx_snvs_pwrkey_resume(struct device *dev)
> > +static int __maybe_unused imx_snvs_pwrkey_resume(struct device *dev)
> >  {
> >  	struct platform_device *pdev = to_platform_device(dev);
> >  	struct pwrkey_drv_data *pdata = platform_get_drvdata(pdev);
> > --
> > 2.7.0
> 

-- 
Dmitry

  reply	other threads:[~2016-03-02 17:12 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 15:58 [PATCH 00/14] drivers: use __maybe_unused to hide pm functions Arnd Bergmann
2016-03-02 15:58 ` Arnd Bergmann
2016-03-02 15:58 ` Arnd Bergmann
2016-03-02 15:58 ` Arnd Bergmann
2016-03-02 15:58 ` Arnd Bergmann
2016-03-02 15:58 ` [PATCH 01/14] pinctrl: at91: " Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-02 16:06   ` Nicolas Ferre
2016-03-02 16:06     ` Nicolas Ferre
2016-03-02 16:06     ` Nicolas Ferre
2016-03-02 16:47   ` Ludovic Desroches
2016-03-02 16:47     ` Ludovic Desroches
2016-03-02 16:47     ` Ludovic Desroches
2016-03-09  4:09   ` Linus Walleij
2016-03-09  4:09     ` Linus Walleij
2016-03-02 15:58 ` [PATCH 02/14] irqchip: st: use __maybe_unused to hide st_irq_syscfg_resume Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-02 15:58 ` [PATCH 03/14] power: ipaq-micro-battery: use __maybe_unused to hide pm functions Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-03 14:23   ` Sebastian Reichel
2016-03-03 14:23     ` Sebastian Reichel
2016-03-02 15:58 ` [PATCH 04/14] power: pm2301-charger: " Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-03 14:23   ` Sebastian Reichel
2016-03-03 14:23     ` Sebastian Reichel
2016-03-02 15:58 ` [PATCH 05/14] mfd: ipaq-micro: " Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-08  4:27   ` Lee Jones
2016-03-08  4:27     ` Lee Jones
2016-03-02 15:58 ` [PATCH 06/14] dma: sirf: " Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-03  3:47   ` Vinod Koul
2016-03-03  3:47     ` Vinod Koul
2016-03-03 12:33     ` Arnd Bergmann
2016-03-03 12:33       ` Arnd Bergmann
2016-03-04 15:02       ` Vinod Koul
2016-03-04 15:02         ` Vinod Koul
2016-03-02 15:58 ` [PATCH 07/14] hw_random: exynos: " Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-02 15:58   ` Arnd Bergmann
2016-03-02 23:43   ` Krzysztof Kozlowski
2016-03-02 23:43     ` Krzysztof Kozlowski
2016-03-11 13:31   ` Herbert Xu
2016-03-11 13:31     ` Herbert Xu
2016-03-02 15:59 ` [PATCH 08/14] scsi: mvumi: " Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-03  8:30   ` Johannes Thumshirn
2016-03-03  8:30     ` Johannes Thumshirn
2016-03-05 22:08   ` Martin K. Petersen
2016-03-05 22:08     ` Martin K. Petersen
2016-03-02 15:59 ` [PATCH 09/14] amd-xgbe: " Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-02 15:59 ` [PATCH 10/14] wireless: cw1200: use __maybe_unused to hide pm functions_ Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-08 10:33   ` [10/14] " Kalle Valo
2016-03-08 10:33     ` Kalle Valo
2016-03-08 10:33   ` Kalle Valo
2016-03-02 15:59 ` [PATCH 11/14] input: spear-keyboard: use __maybe_unused to hide pm functions Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-02 17:12   ` Dmitry Torokhov
2016-03-02 17:12     ` Dmitry Torokhov
2016-03-02 15:59 ` [PATCH 12/14] keyboard: snvs-pwrkey: " Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-02 16:04   ` Frank Li
2016-03-02 16:04     ` Frank Li
2016-03-02 16:04     ` Frank Li
2016-03-02 17:12     ` Dmitry Torokhov [this message]
2016-03-02 17:12       ` Dmitry Torokhov
2016-03-02 15:59 ` [PATCH 13/14] [media] omap3isp: use IS_ENABLED() " Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-02 15:59 ` [PATCH 14/14] ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-02 15:59   ` Arnd Bergmann
2016-03-05 12:25   ` Applied "ASoC: rockchip: use __maybe_unused to hide st_irq_syscfg_resume" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160302171238.GA4318@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Frank.Li@freescale.com \
    --cc=arnd@arndb.de \
    --cc=b38343@freescale.com \
    --cc=frank.li@nxp.com \
    --cc=javier@osg.samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.