lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aDIfNZtSwZ1HwW2l@shell.armlinux.org.uk>
Date: Sat, 24 May 2025 20:34:13 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: lizhe <sensor1010@....com>, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	mcoquelin.stm32@...il.com, alexandre.torgue@...s.st.com,
	jonas@...boo.se, david.wu@...k-chips.com, wens@...e.org,
	u.kleine-koenig@...libre.com, an.petrous@....nxp.com,
	netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH] net: dwmac-rk: MAC clock should be truned off

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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ