From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: lizhe <sensor1010@163.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, jonas@kwiboo.se,
david.wu@rock-chips.com, wens@csie.org,
u.kleine-koenig@baylibre.com, an.petrous@oss.nxp.com,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH] net: dwmac-rk: MAC clock should be truned off
Date: Sat, 24 May 2025 20:34:13 +0100 [thread overview]
Message-ID: <aDIfNZtSwZ1HwW2l@shell.armlinux.org.uk> (raw)
In-Reply-To: <112fa3c4-908d-4e31-9288-b3a2949555b0@lunn.ch>
On Sat, May 24, 2025 at 04:48:15PM +0200, Andrew Lunn wrote:
> On Sat, May 24, 2025 at 10:05:47PM +0800, lizhe wrote:
> > Hi, Anerdw
> > The following is the logic for calling this function:
> >
> >
> > rk_gmac_powerup() {
> >
> > ret = phy_power_on(bsp_priv, true); // here.
> >
> > if (ret) {
> >
> > gmac_clk_enable(bsp_priv, false);
> >
> > return ret;
> >
> > }
> >
> > }
>
> Ah, there is something funny with your patch. Look at the diff:
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> index 700858ff6f7c..036e45be5828 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> @@ -1648,7 +1648,7 @@ static int gmac_clk_enable(struct rk_priv_data *bsp_priv, bool enable)
>
> This line tells you where in the file you are patching, and the
> function to be patched. This is what i looked at,
> gmac_clk_enable(). And gmac_clk_enable() has a similar structure, ret
> declared at the beginning, return 0 at the end. But the only way to
> that return 0 is without error.
>
> But patch is actually for:
>
> static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
Andrew, this is not a problem. This is how diffs work. If the function
hasn't actually started at the point the context starts, then the
previous function will appear in the comment after the line numbers.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
prev parent reply other threads:[~2025-05-24 19:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 15:15 [PATCH] net: dwmac-rk: MAC clock should be truned off 李哲
2025-05-23 16:20 ` Andrew Lunn
[not found] ` <2525c791.3415.197029d3705.Coremail.sensor1010@163.com>
2025-05-24 14:48 ` Andrew Lunn
2025-05-24 19:34 ` Russell King (Oracle) [this message]
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=aDIfNZtSwZ1HwW2l@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=alexandre.torgue@foss.st.com \
--cc=an.petrous@oss.nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=david.wu@rock-chips.com \
--cc=edumazet@google.com \
--cc=jonas@kwiboo.se \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sensor1010@163.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=wens@csie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox