From: Alexander H Duyck <alexander.duyck@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Roger Quadros <rogerq@kernel.org>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Jiri Pirko <jiri@nvidia.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef
Date: Fri, 16 Dec 2022 08:14:24 -0800 [thread overview]
Message-ID: <b72b0f7692e5693f214d6acea33b878bfb3a372c.camel@gmail.com> (raw)
In-Reply-To: <20221215163918.611609-1-arnd@kernel.org>
On Thu, 2022-12-15 at 17:39 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The #ifdef check is incorrect and leads to a warning:
>
> drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function]
> 1679 | static void am65_cpsw_nuss_remove_rx_chns(void *data)
>
> It's better to remove the #ifdef here and use the modern
> SYSTEM_SLEEP_PM_OPS() macro instead.
>
> Fixes: 24bc19b05f1f ("net: ethernet: ti: am65-cpsw: Add suspend/resume support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> index 9decb0c7961b..ecbde83b5243 100644
> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> @@ -2878,7 +2878,6 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev)
> return 0;
> }
>
> -#ifdef CONFIG_PM_SLEEP
> static int am65_cpsw_nuss_suspend(struct device *dev)
> {
> struct am65_cpsw_common *common = dev_get_drvdata(dev);
> @@ -2964,10 +2963,9 @@ static int am65_cpsw_nuss_resume(struct device *dev)
>
> return 0;
> }
> -#endif /* CONFIG_PM_SLEEP */
>
> static const struct dev_pm_ops am65_cpsw_nuss_dev_pm_ops = {
> - SET_SYSTEM_SLEEP_PM_OPS(am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume)
> + SYSTEM_SLEEP_PM_OPS(am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume)
> };
>
> static struct platform_driver am65_cpsw_nuss_driver = {
Looks good to me.
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
next prev parent reply other threads:[~2022-12-16 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 16:39 [PATCH] net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef Arnd Bergmann
2022-12-16 16:14 ` Alexander H Duyck [this message]
2022-12-17 5:20 ` patchwork-bot+netdevbpf
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=b72b0f7692e5693f214d6acea33b878bfb3a372c.camel@gmail.com \
--to=alexander.duyck@gmail.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox