Message ID | 20200925215524.2899527-3-sam@ravnborg.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/rockchip: fix build + warning | expand |
Hi Sam, Thank you for your patch. On 25/9/20 23:55, Sam Ravnborg wrote: > Commit 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static") > introduced the following warning in some builds: > > cdn-dp-core.c:1124:12: warning: ‘cdn_dp_resume’ defined but not used > 1124 | static int cdn_dp_resume(struct device *dev) > | ^~~~~~~~~~~~~ > > Fix this by defining cdn_dp_resume __maybe_unused > > Signed-off-by: Sam Ravnborg <sam@ravnborg.org> > Fixes: 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static") > Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> > Cc: Heiko Stuebner <heiko@sntech.de> > Cc: Sandy Huang <hjc@rock-chips.com> > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-rockchip@lists.infradead.org > Cc: <stable@vger.kernel.org> # v5.8+ > --- Hopefully this time this change lands ;-) Similar patches [1], [2], [3], were sent in the past by different authors but for some reason never reached upstream. [1] https://lkml.org/lkml/2020/4/28/1703 [2] https://www.spinics.net/lists/dri-devel/msg268818.html [3] https://lkml.org/lkml/2020/8/10/1412 > drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c > index a4a45daf93f2..1162e321aaed 100644 > --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c > +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c > @@ -1121,7 +1121,7 @@ static int cdn_dp_suspend(struct device *dev) Shouldn't cdn_dp_suspend also have a __maybe_unused? With that, Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> > return ret; > } > > -static int cdn_dp_resume(struct device *dev) > +static int __maybe_unused cdn_dp_resume(struct device *dev) > { > struct cdn_dp_device *dp = dev_get_drvdata(dev); > >
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index a4a45daf93f2..1162e321aaed 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -1121,7 +1121,7 @@ static int cdn_dp_suspend(struct device *dev) return ret; } -static int cdn_dp_resume(struct device *dev) +static int __maybe_unused cdn_dp_resume(struct device *dev) { struct cdn_dp_device *dp = dev_get_drvdata(dev);
Commit 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static") introduced the following warning in some builds: cdn-dp-core.c:1124:12: warning: ‘cdn_dp_resume’ defined but not used 1124 | static int cdn_dp_resume(struct device *dev) | ^~~~~~~~~~~~~ Fix this by defining cdn_dp_resume __maybe_unused Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Fixes: 7c49abb4c2f8 ("drm/rockchip: cdn-dp-core: Make cdn_dp_core_suspend/resume static") Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Sandy Huang <hjc@rock-chips.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: <stable@vger.kernel.org> # v5.8+ --- drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)