diff mbox

memory: atmel-ebi: mark PM ops as __maybe_unused

Message ID 20170419174824.4134087-1-arnd@arndb.de (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann April 19, 2017, 5:48 p.m. UTC
We get a harmless warning without CONFIG_PM:

drivers/memory/atmel-ebi.c:584:12: error: 'atmel_ebi_resume' defined but not used [-Werror=unused-function]

Marking the function as __maybe_unused does the right thing here
and drops it silently when unused.

Fixes: a483fb10e5ea ("memory: atmel-ebi: Add PM ops")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/memory/atmel-ebi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Belloni April 19, 2017, 5:52 p.m. UTC | #1
On 19/04/2017 at 19:48:07 +0200, Arnd Bergmann wrote:
> We get a harmless warning without CONFIG_PM:
> 
> drivers/memory/atmel-ebi.c:584:12: error: 'atmel_ebi_resume' defined but not used [-Werror=unused-function]
> 
> Marking the function as __maybe_unused does the right thing here
> and drops it silently when unused.
> 
> Fixes: a483fb10e5ea ("memory: atmel-ebi: Add PM ops")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Sure,

Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

I think you can safely take it through arm-soc directly.

> ---
>  drivers/memory/atmel-ebi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
> index 35910f945bfa..99e644cda4d1 100644
> --- a/drivers/memory/atmel-ebi.c
> +++ b/drivers/memory/atmel-ebi.c
> @@ -581,7 +581,7 @@ static int atmel_ebi_probe(struct platform_device *pdev)
>  	return of_platform_populate(np, NULL, NULL, dev);
>  }
>  
> -static int atmel_ebi_resume(struct device *dev)
> +static __maybe_unused int atmel_ebi_resume(struct device *dev)
>  {
>  	struct atmel_ebi *ebi = dev_get_drvdata(dev);
>  	struct atmel_ebi_dev *ebid;
> -- 
> 2.9.0
>
Alexandre Belloni May 15, 2017, 9:38 a.m. UTC | #2
On 19/04/2017 at 19:48:07 +0200, Arnd Bergmann wrote:
> We get a harmless warning without CONFIG_PM:
> 
> drivers/memory/atmel-ebi.c:584:12: error: 'atmel_ebi_resume' defined but not used [-Werror=unused-function]
> 
> Marking the function as __maybe_unused does the right thing here
> and drops it silently when unused.
> 
> Fixes: a483fb10e5ea ("memory: atmel-ebi: Add PM ops")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/memory/atmel-ebi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Applied, thanks.
diff mbox

Patch

diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 35910f945bfa..99e644cda4d1 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -581,7 +581,7 @@  static int atmel_ebi_probe(struct platform_device *pdev)
 	return of_platform_populate(np, NULL, NULL, dev);
 }
 
-static int atmel_ebi_resume(struct device *dev)
+static __maybe_unused int atmel_ebi_resume(struct device *dev)
 {
 	struct atmel_ebi *ebi = dev_get_drvdata(dev);
 	struct atmel_ebi_dev *ebid;