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

phy: tegra: xusb: mark PM functions as __maybe_unused

When these are not referenced, gcc prints a harmless warning:

drivers/phy/tegra/xusb.c:1286:12: error: 'tegra_xusb_padctl_resume_noirq' defined but not used [-Werror=unused-function]
1286 | static int tegra_xusb_padctl_resume_noirq(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/phy/tegra/xusb.c:1276:12: error: 'tegra_xusb_padctl_suspend_noirq' defined but not used [-Werror=unused-function]
1276 | static int tegra_xusb_padctl_suspend_noirq(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: c545a9056712 ("phy: tegra: xusb: Add sleepwalk and suspend/resume")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210721152550.2976003-1-arnd@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Arnd Bergmann and committed by
Vinod Koul
c1302e8c bfccd9a7

+2 -2
+2 -2
drivers/phy/tegra/xusb.c
··· 1273 1273 return err; 1274 1274 } 1275 1275 1276 - static int tegra_xusb_padctl_suspend_noirq(struct device *dev) 1276 + static __maybe_unused int tegra_xusb_padctl_suspend_noirq(struct device *dev) 1277 1277 { 1278 1278 struct tegra_xusb_padctl *padctl = dev_get_drvdata(dev); 1279 1279 ··· 1283 1283 return 0; 1284 1284 } 1285 1285 1286 - static int tegra_xusb_padctl_resume_noirq(struct device *dev) 1286 + static __maybe_unused int tegra_xusb_padctl_resume_noirq(struct device *dev) 1287 1287 { 1288 1288 struct tegra_xusb_padctl *padctl = dev_get_drvdata(dev); 1289 1289