Thread (2 messages) 2 messages, 2 authors, 2019-09-19

RE: [PATCH] hv: vmbus: mark PM functions as __maybe_unused

From: Dexuan Cui <decui@microsoft.com>
Date: 2019-09-19 05:15:10
Also in: lkml

From: Arnd Bergmann <arnd@arndb.de>
Sent: Wednesday, September 18, 2019 1:01 PM

When CONFIG_PM is disabled, we get a couple of harmless warnings:

drivers/hv/vmbus_drv.c:918:12: error: unused function 'vmbus_suspend'
[-Werror,-Wunused-function]
drivers/hv/vmbus_drv.c:937:12: error: unused function 'vmbus_resume'
[-Werror,-Wunused-function]
drivers/hv/vmbus_drv.c:2128:12: error: unused function 'vmbus_bus_suspend'
[-Werror,-Wunused-function]
drivers/hv/vmbus_drv.c:2208:12: error: unused function 'vmbus_bus_resume'
[-Werror,-Wunused-function]

Mark these functions __maybe_unused to let gcc drop them silently.
Hi Arnd,
Thanks for reporting the issue!

If CONFIG_PM is not set, IMO it's better to comment out these functions. :-)

I'll post a patch for this with you Cc'd.

Thanks,
-- Dexuan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help