drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume __maybe_unused
Subsystems (4)
PATCH 1/1 drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume __maybe_unused
With the new static annotation, the compiler warns when the functions are actually unused:
drivers/gpu/drm/rockchip/cdn-dp-core.c:1123:12: error: 'cdn_dp_resume' defined but not used [-Werror=unused-function]
1123 | static int cdn_dp_resume(struct device *dev)
| ^~~~~~~~~~~~~
Mark them __maybe_unused to suppress that warning as well.
--- drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/rockchip/cdn-dp-core.c +2 -2
@@ -1106,7 +1106,7 @@ static const struct component_ops cdn_dp_component_ops = { .unbind = cdn_dp_unbind, }; -static int cdn_dp_suspend (struct device *dev) +static __maybe_unused int cdn_dp_suspend (struct device *dev) {struct cdn_dp_device *dp =dev_get_drvdata (dev);int ret =0 ;
@@ -1120,7 +1120,7 @@ static int cdn_dp_suspend(struct device *dev)return ret; } -static int cdn_dp_resume (struct device *dev) +static __maybe_unused int cdn_dp_resume (struct device *dev) {struct cdn_dp_device *dp =dev_get_drvdata (dev);
Signature · 1 line
2.26.0
Hi Arnd,
Quoted 3 lines · Arnd Bergmann
With the new static annotation, the compiler warns when the functions are actually unused:
Right, thank you for the patch.
Quoted 8 lines
drivers/gpu/drm/rockchip/cdn-dp-core.c:1123:12: error: 'cdn_dp_resume' defined but not used [-Werror=unused-function]
1123 | static intcdn_dp_resume(struct device *dev)| ^~~~~~~~~~~~~Mark them
__maybe_unusedto suppress that warning as well.Fixes 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/rockchip/cdn-dp-core.c +2
-2@@ -1106,7 +1106,7 @@ static const struct component_ops cdn_dp_component_ops = { .unbind = cdn_dp_unbind, }; -static int cdn_dp_suspend (struct device *dev) +static __maybe_unused int cdn_dp_suspend (struct device *dev) {struct cdn_dp_device *dp =dev_get_drvdata (dev);int ret =0 ;@@ -1120,7 +1120,7 @@ static int cdn_dp_suspend(struct device *dev)return ret; } -static int cdn_dp_resume (struct device *dev) +static __maybe_unused int cdn_dp_resume (struct device *dev) {struct cdn_dp_device *dp =dev_get_drvdata (dev);