Re: [PATCH] i2c: i801: mark PM functions as __maybe_unused

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2018 at 11:09:46PM +0200, Arnd Bergmann wrote:
> Changing from UNIVERSAL_DEV_PM_OPS to SIMPLE_DEV_PM_OPS caused a harmless
> warning in configurations without CONFIG_PM_SLEEP:
> 
> drivers/i2c/busses/i2c-i801.c:1723:12: error: 'i801_resume' defined but not used [-Werror=unused-function]
>  static int i801_resume(struct device *dev)
>             ^~~~~~~~~~~
> drivers/i2c/busses/i2c-i801.c:1714:12: error: 'i801_suspend' defined but not used [-Werror=unused-function]
>  static int i801_suspend(struct device *dev)
> 
> This removes the incorrect #ifdef and instead marks both functions as
> __maybe_unused, which is a more robust way to express the same thing.
> 
> Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Should be fixed in my for-next branch:

https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git/commit/drivers/i2c/busses/i2c-i801.c?h=i2c/for-next&id=4b2f9bd5e39fb47011074c9a26b64b616acc18f0

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux