drm/tegra: mark t186 display hub PM functions __maybe_unused
PATCH 1/1 drm/tegra: mark t186 display hub PM functions __maybe_unused
The newly introduced driver has optional suspend/resume functions, causing a warning when CONFIG_PM is disabled:
drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function] drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function]
This marks them __maybe_unused to shut up the warnings.
--- drivers/gpu/drm/tegra/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/tegra/hub.c +2 -2
@@ -730,7 +730,7 @@ static int tegra_display_hub_remove(struct platform_device *pdev)return err; } -static int tegra_display_hub_suspend (struct device *dev) +static int __maybe_unused tegra_display_hub_suspend (struct device *dev) {struct tegra_display_hub *hub =dev_get_drvdata (dev);int err;
@@ -746,7 +746,7 @@ static int tegra_display_hub_suspend(struct device *dev)return 0 ; } -static int tegra_display_hub_resume (struct device *dev) +static int __maybe_unused tegra_display_hub_resume (struct device *dev) {struct tegra_display_hub *hub =dev_get_drvdata (dev);int err;
Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 29 lines · Arnd Bergmann
The newly introduced driver has optional suspend/resume functions, causing a warning when
CONFIG_PMis disabled:
drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function]drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function]This marks them
__maybe_unusedto shut up the warnings.Fixes c4755fb9064f ("drm/tegra: Add Tegra186 display hub support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/tegra/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/tegra/hub.c +1
-1@@ -730,7 +730,7 @@ static int tegra_display_hub_remove(struct platform_device *pdev)return err; } -static int tegra_display_hub_suspend (struct device *dev) +static int __maybe_unused tegra_display_hub_suspend (struct device *dev) {struct tegra_display_hub *hub =dev_get_drvdata (dev);int err;
drivers/gpu/drm/tegra/hub.c static int tegra_display_hub_suspend(struct device *dev) · line 752
Quoted 8 lines
drivers/gpu/drm/tegra/hub.c +1
-1@@ -746,7 +746,7 @@ static int tegra_display_hub_suspend(struct device *dev)return 0 ; } -static int tegra_display_hub_resume (struct device *dev) +static int __maybe_unused tegra_display_hub_resume (struct device *dev) {struct tegra_display_hub *hub =dev_get_drvdata (dev);int err;
Probably would be better to put '#ifdef CONFIG_PM' around these functions for the consistency with the other drm/tegra files.
Quoted 16 lines · Dmitry Osipenko
Quoted 15 lines · Arnd Bergmann
drivers/gpu/drm/tegra/hub.c +1
-1@@ -730,7 +730,7 @@ static int tegra_display_hub_remove(struct platform_device *pdev)return err; } -static int tegra_display_hub_suspend (struct device *dev) +static int __maybe_unused tegra_display_hub_suspend (struct device *dev) {struct tegra_display_hub *hub =dev_get_drvdata (dev);int err;@@ -746,7 +746,7 @@ static int tegra_display_hub_suspend(struct device *dev)return 0 ; }
Quoted 9 lines
drivers/gpu/drm/tegra/hub.c static int tegra_display_hub_suspend(struct device *dev) · line 752
Quoted 6 lines
drivers/gpu/drm/tegra/hub.c +1
-1-static int tegra_display_hub_resume (struct device *dev) +static int __maybe_unused tegra_display_hub_resume (struct device *dev) {struct tegra_display_hub *hub =dev_get_drvdata (dev);int err;Probably would be better to put '#ifdef
CONFIG_PM' around these functions for the consistency with the other drm/tegra files.
I usually use __maybe_unused because it is less error-prone, the #ifdefs are often
wrong, either they are around the wrong functions or they use CONFIG_PM CONFIG_PM_SLEEP interchangeably, which they are not. If you want to add a patch with the correct #ifdef instead of my patch, that's fine with me (add a Reported-by tag then), but I won't send a patch to do that myself.
Arnd
Quoted 6 lines · Arnd Bergmann
The newly introduced driver has optional suspend/resume functions, causing a warning when
CONFIG_PMis disabled:
drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function]drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function]
Quoted 7 lines
This marks them
__maybe_unusedto shut up the warnings.Fixes c4755fb9064f ("drm/tegra: Add Tegra186 display hub support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/tegra/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
We had touched on this topic in a different thread. The Tegra DRM driver currently relies on runtime PM to work properly. I don't see a reason to not make that official by adding a select PM to menuconfig ARCH_TEGRA on 32-bit ARM just like we already do on 64-bit ARM.
I've gone and applied this patch as an interim solution. Once we've made the switch to select PM on all generations of Tegra we can remove all the #ifdef and __maybe_unused.
Thanks,
Thierry
Quoted 15 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann
The newly introduced driver has optional suspend/resume functions, causing a warning when
CONFIG_PMis disabled:
drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function]drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function]Quoted 7 lines
This marks them
__maybe_unusedto shut up the warnings.Fixes c4755fb9064f ("drm/tegra: Add Tegra186 display hub support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/tegra/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 8 lines
We had touched on this topic in a different thread. The Tegra DRM driver currently relies on runtime PM to work properly. I don't see a reason to not make that official by adding a select PM to menuconfig
ARCH_TEGRAon 32-bit ARM just like we already do on 64-bit ARM.I've gone and applied this patch as an interim solution. Once we've made the switch to select PM on all generations of Tegra we can remove all the #ifdef and
__maybe_unused.
Sounds good, thanks!
Arnd
Quoted 15 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann
The newly introduced driver has optional suspend/resume functions, causing a warning when
CONFIG_PMis disabled:
drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function]drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function]Quoted 7 lines
This marks them
__maybe_unusedto shut up the warnings.Fixes c4755fb9064f ("drm/tegra: Add Tegra186 display hub support")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/gpu/drm/tegra/hub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
We had touched on this topic in a different thread. The Tegra DRM driver currently relies on runtime PM to work properly. I don't see a reason to not make that official by adding a select PM to menuconfig
ARCH_TEGRAon 32-bit ARM just like we already do on 64-bit ARM.
Since you've repeated the third time that you 'don't see a reason', I'll take it as NAK for my patch that made drm/tegra to work with the disabled PM and drop it. Next time please state it clearly if you oppose to something strongly. Thanks.