Skip to contentSkip to conversation

mailbox: tegra-hsp: mark PM functions as __maybe_unused

PATCH In review Anders Roxell 2 participants 4 messages Jan 8, 2019 – Jun 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: tegra-hsp: mark PM functions as __maybe_unused

Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions:

drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
static int tegra_hsp_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the warning and silently drop the functions without having to add ugly #ifdefs.

Fixes 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
---
 drivers/mailbox/tegra-hsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/tegra-hsp.c +1 -1
index e443f6a2ec4b..b9ce823f79ab 100644
@@ -779,7 +779,7 @@ static int tegra_hsp_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int tegra_hsp_resume(struct device *dev)
+static __maybe_unused int tegra_hsp_resume(struct device *dev)
 {
 	struct tegra_hsp *hsp = dev_get_drvdata(dev);
 	unsigned int i;
Signature · 1 line
2.19.2
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Anders Roxell

Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions:

drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
static int tegra_hsp_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~
Quoted 8 lines

Mark them as __maybe_unused to shut up the warning and silently drop the functions without having to add ugly #ifdefs.

Fixes 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
---
 drivers/mailbox/tegra-hsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw
Quoted 12 lines · Thierry Reding
Quoted 10 lines · Anders Roxell

Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions:

drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
static int tegra_hsp_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the warning and silently drop the functions without having to add ugly #ifdefs.

Quoted 7 lines
Quoted 5 lines
Fixes 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
---
 drivers/mailbox/tegra-hsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Will this be picked up ?

Cheers,
Anders

#3 lore raw
Quoted 20 lines · Anders Roxell
Quoted 18 lines · Thierry Reding
Quoted 15 lines · Anders Roxell

Without CONFIG_PM_SLEEP, we get annoying warnings about unused functions:

drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
static int tegra_hsp_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the warning and silently drop the functions without having to add ugly #ifdefs.

Fixes 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
---
 drivers/mailbox/tegra-hsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines
Quoted 1 line

Will this be picked up ?

its already solved.

Sorry for the noice. =/

Anders

Quoted 3 lines

Cheers,
Anders