2019-01-08 14:52:46

by Anders Roxell

[permalink] [raw]
Subject: [PATCH] mailbox: tegra-hsp: mark PM functions as __maybe_unused

Without CONFIG_PM_SLEEP, we get annoying warnings about unused
functions:

drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
static int tegra_hsp_resume(struct device *dev)
^~~~~~~~~~~~~~~~

Mark them as __maybe_unused to shut up the warning and silently drop the
functions without having to add ugly #ifdefs.

Fixes: 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
Signed-off-by: Anders Roxell <[email protected]>
---
drivers/mailbox/tegra-hsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c
index e443f6a2ec4b..b9ce823f79ab 100644
--- a/drivers/mailbox/tegra-hsp.c
+++ b/drivers/mailbox/tegra-hsp.c
@@ -779,7 +779,7 @@ static int tegra_hsp_probe(struct platform_device *pdev)
return 0;
}

-static int tegra_hsp_resume(struct device *dev)
+static __maybe_unused int tegra_hsp_resume(struct device *dev)
{
struct tegra_hsp *hsp = dev_get_drvdata(dev);
unsigned int i;
--
2.19.2



2019-01-10 08:17:43

by Thierry Reding

[permalink] [raw]
Subject: Re: [PATCH] mailbox: tegra-hsp: mark PM functions as __maybe_unused

On Tue, Jan 08, 2019 at 03:37:13PM +0100, Anders Roxell wrote:
> Without CONFIG_PM_SLEEP, we get annoying warnings about unused
> functions:
>
> drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
> static int tegra_hsp_resume(struct device *dev)
> ^~~~~~~~~~~~~~~~
>
> Mark them as __maybe_unused to shut up the warning and silently drop the
> functions without having to add ugly #ifdefs.
>
> Fixes: 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
> Signed-off-by: Anders Roxell <[email protected]>
> ---
> drivers/mailbox/tegra-hsp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Thierry Reding <[email protected]>


Attachments:
(No filename) (755.00 B)
signature.asc (849.00 B)
Download all attachments

2019-06-19 07:56:57

by Anders Roxell

[permalink] [raw]
Subject: Re: [PATCH] mailbox: tegra-hsp: mark PM functions as __maybe_unused

On Thu, 10 Jan 2019 at 09:16, Thierry Reding <[email protected]> wrote:
>
> On Tue, Jan 08, 2019 at 03:37:13PM +0100, Anders Roxell wrote:
> > Without CONFIG_PM_SLEEP, we get annoying warnings about unused
> > functions:
> >
> > drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
> > static int tegra_hsp_resume(struct device *dev)
> > ^~~~~~~~~~~~~~~~
> >
> > Mark them as __maybe_unused to shut up the warning and silently drop the
> > functions without having to add ugly #ifdefs.
> >
> > Fixes: 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
> > Signed-off-by: Anders Roxell <[email protected]>
> > ---
> > drivers/mailbox/tegra-hsp.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Acked-by: Thierry Reding <[email protected]>

Will this be picked up ?

Cheers,
Anders

2019-06-19 07:58:42

by Anders Roxell

[permalink] [raw]
Subject: Re: [PATCH] mailbox: tegra-hsp: mark PM functions as __maybe_unused

On Wed, 19 Jun 2019 at 09:56, Anders Roxell <[email protected]> wrote:
>
> On Thu, 10 Jan 2019 at 09:16, Thierry Reding <[email protected]> wrote:
> >
> > On Tue, Jan 08, 2019 at 03:37:13PM +0100, Anders Roxell wrote:
> > > Without CONFIG_PM_SLEEP, we get annoying warnings about unused
> > > functions:
> > >
> > > drivers/mailbox/tegra-hsp.c:782:12: warning: ‘tegra_hsp_resume’ defined but not used [-Wunused-function]
> > > static int tegra_hsp_resume(struct device *dev)
> > > ^~~~~~~~~~~~~~~~
> > >
> > > Mark them as __maybe_unused to shut up the warning and silently drop the
> > > functions without having to add ugly #ifdefs.
> > >
> > > Fixes: 9a63f0f40599 ("mailbox: tegra-hsp: Add suspend/resume support")
> > > Signed-off-by: Anders Roxell <[email protected]>
> > > ---
> > > drivers/mailbox/tegra-hsp.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Acked-by: Thierry Reding <[email protected]>
>
> Will this be picked up ?

its already solved.

Sorry for the noice. =/

Anders

>
> Cheers,
> Anders