memory: tegra: avoid unused function warnings
Subsystems (2)
PATCH 1/1 memory: tegra: avoid unused function warnings
The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings:
drivers/memory/tegra/tegra186.c:1578:12: error: 'tegra186_mc_resume' defined but not used [-Werror=unused-function]
1578 | static int tegra186_mc_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
drivers/memory/tegra/tegra186.c:1573:12: error: 'tegra186_mc_suspend' defined but not used [-Werror=unused-function]
1573 | static int tegra186_mc_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~--- drivers/memory/tegra/tegra186.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/memory/tegra/tegra186.c +2 -2
@@ -1570,12 +1570,12 @@ static const struct of_device_id tegra186_mc_of_match[] = { };MODULE_DEVICE_TABLE (of, tegra186_mc_of_match); -static int tegra186_mc_suspend (struct device *dev) +static int __maybe_unused tegra186_mc_suspend (struct device *dev) {return 0 ; } -static int tegra186_mc_resume (struct device *dev) +static int __maybe_unused tegra186_mc_resume (struct device *dev) {struct tegra186_mc *mc =dev_get_drvdata (dev);
Signature · 1 line
2.26.0
Quoted 11 lines · Arnd Bergmann
The suspend/resume functions have no callers depending on configuration, so they must be marked
__maybe_unusedto avoid these harmless warnings:
drivers/memory/tegra/tegra186.c:1578:12: error: 'tegra186_mc_resume' defined but not used [-Werror=unused-function]
1578 | static inttegra186_mc_resume(struct device *dev)| ^~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra186.c:1573:12: error: 'tegra186_mc_suspend' defined but not used [-Werror=unused-function] 1573 | static int tegra186_mc_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~
Quoted 5 lines
Fixes 177602b00641 ("memory: tegra: Add system sleep support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/memory/tegra/tegra186.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Do you want to apply this to ARM SoC directly or would you prefer if I collected fixes and send a PR sometime later in the cycle?
If the former:
Thierry Reding
AppliedQuoted 11 lines · Arnd Bergmann
The suspend/resume functions have no callers depending on configuration, so they must be marked
__maybe_unusedto avoid these harmless warnings:
drivers/memory/tegra/tegra186.c:1578:12: error: 'tegra186_mc_resume' defined but not used [-Werror=unused-function]
1578 | static inttegra186_mc_resume(struct device *dev)| ^~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra186.c:1573:12: error: 'tegra186_mc_suspend' defined but not used [-Werror=unused-function] 1573 | static int tegra186_mc_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~
Quoted 5 lines
Fixes 177602b00641 ("memory: tegra: Add system sleep support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/memory/tegra/tegra186.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to for-5.8/memory, thanks.
Thierry