Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: dm816x: use __maybe_unused to hide pm functions

The dm816x USB PHY driver uses UNIVERSAL_DEV_PM_OPS to access
its suspend/resume functions, which causes a warning about
unused symbols when CONFIG_PM is disabled:

drivers/phy/phy-dm816x-usb.c:121:12: error: 'dm816x_usb_phy_runtime_suspend' defined but not used [-Werror=unused-function]
drivers/phy/phy-dm816x-usb.c:139:12: error: 'dm816x_usb_phy_runtime_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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
9cea322e 9fc7c85d

+2 -2
+2 -2
drivers/phy/phy-dm816x-usb.c
··· 118 118 .owner = THIS_MODULE, 119 119 }; 120 120 121 - static int dm816x_usb_phy_runtime_suspend(struct device *dev) 121 + static int __maybe_unused dm816x_usb_phy_runtime_suspend(struct device *dev) 122 122 { 123 123 struct dm816x_usb_phy *phy = dev_get_drvdata(dev); 124 124 unsigned int mask, val; ··· 136 136 return 0; 137 137 } 138 138 139 - static int dm816x_usb_phy_runtime_resume(struct device *dev) 139 + static int __maybe_unused dm816x_usb_phy_runtime_resume(struct device *dev) 140 140 { 141 141 struct dm816x_usb_phy *phy = dev_get_drvdata(dev); 142 142 unsigned int mask, val;