mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: 李哲 <sensor1010@163.com>
Cc: 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,
	rmk+kernel@armlinux.org.uk, 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: [PATCH] net: dwmac-rk: MAC clock should be truned off
Date: Fri, 23 May 2025 18:20:13 +0200	[thread overview]
Message-ID: <d5325aba-507e-47b6-83fb-b9156c1f351e@lunn.ch> (raw)
In-Reply-To: <20250523151521.3503-1-sensor1010@163.com>

On Fri, May 23, 2025 at 08:15:21AM -0700, 李哲 wrote:
> if PHY power-on fails, clockassociated the MAC should
> be disabled during the MAC initialization process

The Subject: line has a typo.

> Signed-off-by: 李哲 <sensor1010@163.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 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)
>  static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
>  {
>  	struct regulator *ldo = bsp_priv->regulator;
> -	int ret;
> +	int ret = 0;
>  	struct device *dev = &bsp_priv->pdev->dev;
>  
>  	if (enable) {
> @@ -1661,7 +1661,7 @@ static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
>  			dev_err(dev, "fail to disable phy-supply\n");
>  	}
>  
> -	return 0;
> +	return ret;

This does not make much sense to me. How do you get here with ret not
being 0?

    Andrew

---
pw-bot: cr

  reply	other threads:[~2025-05-23 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-23 15:15 李哲
2025-05-23 16:20 ` Andrew Lunn [this message]
     [not found]   ` <2525c791.3415.197029d3705.Coremail.sensor1010@163.com>
2025-05-24 14:48     ` Andrew Lunn
2025-05-24 19:34       ` Russell King (Oracle)

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=d5325aba-507e-47b6-83fb-b9156c1f351e@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandre.torgue@foss.st.com \
    --cc=an.petrous@oss.nxp.com \
    --cc=andrew+netdev@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=rmk+kernel@armlinux.org.uk \
    --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

all inboxes | Powered by JetHome®