[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdU96u41ESayKOa9Z+fy2EvLCbKSNg256N5XZMJMB+9W6A@mail.gmail.com>
Date: Fri, 5 Sep 2025 09:12:12 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Niklas Söderlund <niklas.soderlund@...natech.se>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
linux-sh@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] sh_eth: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Hi Andrew,
Thanks for your comments!
On Thu, 4 Sept 2025 at 20:37, Andrew Lunn <andrew@...n.ch> wrote:
> On Thu, Sep 04, 2025 at 05:18:57PM +0200, Geert Uytterhoeven wrote:
> > Convert the Renesas SuperH Ethernet driver from an open-coded dev_pm_ops
> > structure to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets
> > us drop the checks for CONFIG_PM and CONFIG_PM_SLEEP without impacting
> > code size, while increasing build coverage.
> >
> > Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> > ---
> > drivers/net/ethernet/renesas/sh_eth.c | 13 ++-----------
> > 1 file changed, 2 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
> > index 0516db9dc946fcdb..f16a350736e1aa04 100644
> > --- a/drivers/net/ethernet/renesas/sh_eth.c
> > +++ b/drivers/net/ethernet/renesas/sh_eth.c
> > @@ -3443,8 +3443,6 @@ static void sh_eth_drv_remove(struct platform_device *pdev)
> > free_netdev(ndev);
> > }
> >
> > -#ifdef CONFIG_PM
> > -#ifdef CONFIG_PM_SLEEP
> > static int sh_eth_wol_setup(struct net_device *ndev)
>
> Humm, sh_eth_wol_setup() went from conditional to always available.
Its sole caller is sh_eth_suspend(). If the compiler optimizes away
the latter, it should optimize away the former, too (verified with an
m68k allmodconfig build).
> Can WoL work without PM? Is the current get_wol() and set_wol()
> broken?
>
> Maybe you can take a look at this, do some testing?
You cannot enter system sleep without CONFIG_PM_SLEEP, so enabling
WoL would be pointless.
> It is however not strictly related to this patch, so:
>
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists