[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AMSPR04MB263BDF6CE19C8B5432ECAE588BC0@AMSPR04MB263.eurprd04.prod.outlook.com>
Date: Wed, 2 Mar 2016 16:04:46 +0000
From: Frank Li <frank.li@....com>
To: Arnd Bergmann <arnd@...db.de>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
CC: "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Shawn Guo <shawnguo@...nel.org>,
"b38343@...escale.com" <b38343@...escale.com>,
Javier Martinez Canillas <javier@....samsung.com>,
Frank Li <Frank.Li@...escale.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 12/14] keyboard: snvs-pwrkey: use __maybe_unused to hide
pm functions
> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@...db.de]
> Sent: Wednesday, March 02, 2016 9:59 AM
> To: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Cc: linux-arm-kernel@...ts.infradead.org; Arnd Bergmann <arnd@...db.de>;
> Shawn Guo <shawnguo@...nel.org>; b38343@...escale.com; Javier
> Martinez Canillas <javier@....samsung.com>; Frank Li
> <Frank.Li@...escale.com>; linux-input@...r.kernel.org; linux-
> kernel@...r.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@...db.de>
Acked-by: Frank Li <Frank.Li@....com>
> ---
> 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
Powered by blists - more mailing lists