* [PATCH] drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP
@ 2021-09-12 21:29 ` Adam Borowski
0 siblings, 0 replies; 4+ messages in thread
From: Adam Borowski @ 2021-09-12 21:29 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
dri-devel, linux-rockchip
Cc: Adam Borowski
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
With Linus suddenly loving -Werror, let's get clean.
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 8ab3247dbc4a..bee0f2d2a9be 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
return ret;
}
+#ifdef CONFIG_PM_SLEEP
static int cdn_dp_resume(struct device *dev)
{
struct cdn_dp_device *dp = dev_get_drvdata(dev);
@@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev)
return 0;
}
+#endif
static int cdn_dp_probe(struct platform_device *pdev)
{
--
2.33.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP
@ 2021-09-12 21:29 ` Adam Borowski
0 siblings, 0 replies; 4+ messages in thread
From: Adam Borowski @ 2021-09-12 21:29 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
dri-devel, linux-rockchip
Cc: Adam Borowski
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
With Linus suddenly loving -Werror, let's get clean.
drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index 8ab3247dbc4a..bee0f2d2a9be 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
return ret;
}
+#ifdef CONFIG_PM_SLEEP
static int cdn_dp_resume(struct device *dev)
{
struct cdn_dp_device *dp = dev_get_drvdata(dev);
@@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev)
return 0;
}
+#endif
static int cdn_dp_probe(struct platform_device *pdev)
{
--
2.33.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP
2021-09-12 21:29 ` Adam Borowski
@ 2021-09-12 22:05 ` Nicolas Frattaroli
-1 siblings, 0 replies; 4+ messages in thread
From: Nicolas Frattaroli @ 2021-09-12 22:05 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
dri-devel, linux-rockchip
Cc: Adam Borowski, Adam Borowski
Hi Adam,
On Sonntag, 12. September 2021 23:29:35 CEST Adam Borowski wrote:
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> ---
> With Linus suddenly loving -Werror, let's get clean.
>
> drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 8ab3247dbc4a..bee0f2d2a9be
> 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
> return ret;
> }
>
> +#ifdef CONFIG_PM_SLEEP
I think we prefer the function attribute __maybe_unused here, because it also
makes sure to get rid of the warning for any functions it references.
> static int cdn_dp_resume(struct device *dev)
> {
> struct cdn_dp_device *dp = dev_get_drvdata(dev);
> @@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev)
>
> return 0;
> }
> +#endif
>
> static int cdn_dp_probe(struct platform_device *pdev)
> {
Regards,
Nicolas Frattaroli
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP
@ 2021-09-12 22:05 ` Nicolas Frattaroli
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Frattaroli @ 2021-09-12 22:05 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, David Airlie, Daniel Vetter,
dri-devel, linux-rockchip
Cc: Adam Borowski, Adam Borowski
Hi Adam,
On Sonntag, 12. September 2021 23:29:35 CEST Adam Borowski wrote:
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> ---
> With Linus suddenly loving -Werror, let's get clean.
>
> drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 8ab3247dbc4a..bee0f2d2a9be
> 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -1123,6 +1123,7 @@ static int cdn_dp_suspend(struct device *dev)
> return ret;
> }
>
> +#ifdef CONFIG_PM_SLEEP
I think we prefer the function attribute __maybe_unused here, because it also
makes sure to get rid of the warning for any functions it references.
> static int cdn_dp_resume(struct device *dev)
> {
> struct cdn_dp_device *dp = dev_get_drvdata(dev);
> @@ -1135,6 +1136,7 @@ static int cdn_dp_resume(struct device *dev)
>
> return 0;
> }
> +#endif
>
> static int cdn_dp_probe(struct platform_device *pdev)
> {
Regards,
Nicolas Frattaroli
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-09-13 6:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 21:29 [PATCH] drm/rockchip: fix a -Werror fail on !CONFIG_PM_SLEEP Adam Borowski
2021-09-12 21:29 ` Adam Borowski
2021-09-12 22:05 ` Nicolas Frattaroli
2021-09-12 22:05 ` Nicolas Frattaroli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.