* [PATCH] drm/bridge: cdns: Mark runtime PM operations as maybe unused
@ 2018-04-26 13:58 Thierry Reding
2018-04-26 14:21 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2018-04-26 13:58 UTC (permalink / raw)
To: Archit Taneja, Andrzej Hajda, Laurent Pinchart; +Cc: dri-devel
From: Thierry Reding <treding@nvidia.com>
Building the driver in a configuration with !PM currently causes a
warning about these operations being unused. Mark them as such to shut
up the compiler.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpu/drm/bridge/cdns-dsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c
index c255fc3e1be5..f2d43f24acfb 100644
--- a/drivers/gpu/drm/bridge/cdns-dsi.c
+++ b/drivers/gpu/drm/bridge/cdns-dsi.c
@@ -1337,7 +1337,7 @@ static const struct mipi_dsi_host_ops cdns_dsi_ops = {
.transfer = cdns_dsi_transfer,
};
-static int cdns_dsi_resume(struct device *dev)
+static int __maybe_unused cdns_dsi_resume(struct device *dev)
{
struct cdns_dsi *dsi = dev_get_drvdata(dev);
@@ -1350,7 +1350,7 @@ static int cdns_dsi_resume(struct device *dev)
return 0;
}
-static int cdns_dsi_suspend(struct device *dev)
+static int __maybe_unused cdns_dsi_suspend(struct device *dev)
{
struct cdns_dsi *dsi = dev_get_drvdata(dev);
--
2.17.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/bridge: cdns: Mark runtime PM operations as maybe unused
2018-04-26 13:58 [PATCH] drm/bridge: cdns: Mark runtime PM operations as maybe unused Thierry Reding
@ 2018-04-26 14:21 ` Daniel Vetter
2018-04-26 15:15 ` Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2018-04-26 14:21 UTC (permalink / raw)
To: Thierry Reding; +Cc: Laurent Pinchart, dri-devel
On Thu, Apr 26, 2018 at 03:58:53PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> Building the driver in a configuration with !PM currently causes a
> warning about these operations being unused. Mark them as such to shut
> up the compiler.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
I'd so love if we could use LTO (or at least link time garbage collection
of functions/heap allocations) instead of tons of #ifdef (even in macros)
and __maybe_unused.
Patch looks fine itself.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/bridge/cdns-dsi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c
> index c255fc3e1be5..f2d43f24acfb 100644
> --- a/drivers/gpu/drm/bridge/cdns-dsi.c
> +++ b/drivers/gpu/drm/bridge/cdns-dsi.c
> @@ -1337,7 +1337,7 @@ static const struct mipi_dsi_host_ops cdns_dsi_ops = {
> .transfer = cdns_dsi_transfer,
> };
>
> -static int cdns_dsi_resume(struct device *dev)
> +static int __maybe_unused cdns_dsi_resume(struct device *dev)
> {
> struct cdns_dsi *dsi = dev_get_drvdata(dev);
>
> @@ -1350,7 +1350,7 @@ static int cdns_dsi_resume(struct device *dev)
> return 0;
> }
>
> -static int cdns_dsi_suspend(struct device *dev)
> +static int __maybe_unused cdns_dsi_suspend(struct device *dev)
> {
> struct cdns_dsi *dsi = dev_get_drvdata(dev);
>
> --
> 2.17.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/bridge: cdns: Mark runtime PM operations as maybe unused
2018-04-26 14:21 ` Daniel Vetter
@ 2018-04-26 15:15 ` Thierry Reding
0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2018-04-26 15:15 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Laurent Pinchart, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 978 bytes --]
On Thu, Apr 26, 2018 at 04:21:04PM +0200, Daniel Vetter wrote:
> On Thu, Apr 26, 2018 at 03:58:53PM +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > Building the driver in a configuration with !PM currently causes a
> > warning about these operations being unused. Mark them as such to shut
> > up the compiler.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
>
> I'd so love if we could use LTO (or at least link time garbage collection
> of functions/heap allocations) instead of tons of #ifdef (even in macros)
> and __maybe_unused.
I had discussed this with Arnd Bergmann a long time ago and neither of
us could figure out a way to make that work in this case, so we agreed
that __maybe_unused was the preferred way forward until somebody would
figure out a better way.
> Patch looks fine itself.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Thanks, applied to drm-misc-next.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-26 15:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-26 13:58 [PATCH] drm/bridge: cdns: Mark runtime PM operations as maybe unused Thierry Reding
2018-04-26 14:21 ` Daniel Vetter
2018-04-26 15:15 ` Thierry Reding
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.