lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <216d7d01-78a8-9aa7-b413-49430e65c768@kernel.org>
Date:   Sat, 21 Jan 2017 12:35:28 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Kevin Tsai <ktsai@...ellamicro.com>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: light: cm3605: mark PM functions as __maybe_unused

On 20/01/17 16:25, Arnd Bergmann wrote:
> When CONFIG_PM_SLEEP is disabled, we get a harmless warning
> 
> drivers/iio/light/cm3605.c:292:12: error: 'cm3605_pm_resume' defined but not used [-Werror=unused-function]
> drivers/iio/light/cm3605.c:281:12: error: 'cm3605_pm_suspend' defined but not used [-Werror=unused-function]
> 
> Marking the functions as possibly unused avoids the warning without
> needing to add an #ifdef.
> 
> Fixes: 8afa505c1230 ("iio: light: add driver for Capella CM3605")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan
> ---
>  drivers/iio/light/cm3605.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/cm3605.c b/drivers/iio/light/cm3605.c
> index 2d96543db1ef..980624e9ffb5 100644
> --- a/drivers/iio/light/cm3605.c
> +++ b/drivers/iio/light/cm3605.c
> @@ -278,7 +278,7 @@ static int cm3605_remove(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int cm3605_pm_suspend(struct device *dev)
> +static int __maybe_unused cm3605_pm_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = dev_get_drvdata(dev);
>  	struct cm3605 *cm3605 = iio_priv(indio_dev);
> @@ -289,7 +289,7 @@ static int cm3605_pm_suspend(struct device *dev)
>  	return 0;
>  }
>  
> -static int cm3605_pm_resume(struct device *dev)
> +static int __maybe_unused cm3605_pm_resume(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = dev_get_drvdata(dev);
>  	struct cm3605 *cm3605 = iio_priv(indio_dev);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ