From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Michal Simek <michal.simek@xilinx.com>,
<linux-kernel@vger.kernel.org>, <monstr@monstr.eu>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: macb: Remove CONFIG_PM ifdef because of compilation warning
Date: Mon, 26 Jan 2015 12:11:50 +0100 [thread overview]
Message-ID: <54C620F6.7010008@atmel.com> (raw)
In-Reply-To: <7970145ad4d864eaf31d694d22f2fecbcf6825c9.1422002161.git.michal.simek@xilinx.com>
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
next prev parent reply other threads:[~2015-01-26 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-01-27 1:26 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C620F6.7010008@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.