All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning
@ 2015-01-23  8:36 Michal Simek
  2015-01-26 11:11 ` Nicolas Ferre
  2015-01-27  1:26 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Michal Simek @ 2015-01-23  8:36 UTC (permalink / raw)
  To: linux-kernel, monstr; +Cc: Nicolas Ferre, netdev

[-- Attachment #1: Type: text/plain, Size: 1563 bytes --]

Fix compilation warning:
drivers/net/ethernet/cadence/macb.c:2415:12: warning: 'macb_suspend'
defined but not used [-Wunused-function]
 static int macb_suspend(struct device *dev)
drivers/net/ethernet/cadence/macb.c:2432:12: warning: 'macb_resume'
defined but not used [-Wunused-function]
 static int macb_resume(struct device *dev)

when CONFIG_PM=y, CONFIG_PM_SLEEP=n are used.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/ethernet/cadence/macb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 3767271c7667..23ae32f118c2 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -2411,8 +2411,7 @@ static int __exit macb_remove(struct platform_device *pdev)
 	return 0;
 }

-#ifdef CONFIG_PM
-static int macb_suspend(struct device *dev)
+static int __maybe_unused macb_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct net_device *netdev = platform_get_drvdata(pdev);
@@ -2429,7 +2428,7 @@ static int macb_suspend(struct device *dev)
 	return 0;
 }

-static int macb_resume(struct device *dev)
+static int __maybe_unused macb_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct net_device *netdev = platform_get_drvdata(pdev);
@@ -2444,7 +2443,6 @@ static int macb_resume(struct device *dev)

 	return 0;
 }
-#endif

 static SIMPLE_DEV_PM_OPS(macb_pm_ops, macb_suspend, macb_resume);

--
1.8.2.3


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning
  2015-01-23  8:36 [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning Michal Simek
@ 2015-01-26 11:11 ` Nicolas Ferre
  2015-01-27  1:26 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2015-01-26 11:11 UTC (permalink / raw)
  To: Michal Simek, linux-kernel, monstr; +Cc: netdev

Le 23/01/2015 09:36, Michal Simek a écrit :
> Fix compilation warning:
> drivers/net/ethernet/cadence/macb.c:2415:12: warning: 'macb_suspend'
> defined but not used [-Wunused-function]
>  static int macb_suspend(struct device *dev)
> drivers/net/ethernet/cadence/macb.c:2432:12: warning: 'macb_resume'
> defined but not used [-Wunused-function]
>  static int macb_resume(struct device *dev)
> 
> when CONFIG_PM=y, CONFIG_PM_SLEEP=n are used.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

okay:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
> 
>  drivers/net/ethernet/cadence/macb.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index 3767271c7667..23ae32f118c2 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -2411,8 +2411,7 @@ static int __exit macb_remove(struct platform_device *pdev)
>  	return 0;
>  }
> 
> -#ifdef CONFIG_PM
> -static int macb_suspend(struct device *dev)
> +static int __maybe_unused macb_suspend(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
>  	struct net_device *netdev = platform_get_drvdata(pdev);
> @@ -2429,7 +2428,7 @@ static int macb_suspend(struct device *dev)
>  	return 0;
>  }
> 
> -static int macb_resume(struct device *dev)
> +static int __maybe_unused macb_resume(struct device *dev)
>  {
>  	struct platform_device *pdev = to_platform_device(dev);
>  	struct net_device *netdev = platform_get_drvdata(pdev);
> @@ -2444,7 +2443,6 @@ static int macb_resume(struct device *dev)
> 
>  	return 0;
>  }
> -#endif
> 
>  static SIMPLE_DEV_PM_OPS(macb_pm_ops, macb_suspend, macb_resume);
> 
> --
> 1.8.2.3
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning
  2015-01-23  8:36 [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning Michal Simek
  2015-01-26 11:11 ` Nicolas Ferre
@ 2015-01-27  1:26 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-01-27  1:26 UTC (permalink / raw)
  To: michal.simek; +Cc: linux-kernel, monstr, nicolas.ferre, netdev

From: Michal Simek <michal.simek@xilinx.com>
Date: Fri, 23 Jan 2015 09:36:03 +0100

> Fix compilation warning:
> drivers/net/ethernet/cadence/macb.c:2415:12: warning: 'macb_suspend'
> defined but not used [-Wunused-function]
>  static int macb_suspend(struct device *dev)
> drivers/net/ethernet/cadence/macb.c:2432:12: warning: 'macb_resume'
> defined but not used [-Wunused-function]
>  static int macb_resume(struct device *dev)
> 
> when CONFIG_PM=y, CONFIG_PM_SLEEP=n are used.
> 
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-27  1:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-23  8:36 [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning Michal Simek
2015-01-26 11:11 ` Nicolas Ferre
2015-01-27  1:26 ` David Miller

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.