Subject: Re: [net v2] net: ftgmac100: refactor getting phy device handle

From: Simon Horman <[email-masked]>
Date: Tue, 22 Oct 2024 07:57:53 +0100

On Mon, Oct 21, 2024 at 10:37:05AM +0800, Jacky Chou wrote:
> The ftgmac100 supports NC-SI mode, dedicated PHY and fixed-link
> PHY. The dedicated PHY is using the phy_handle property to get
> phy device handle and the fixed-link phy is using the fixed-link
> property to register a fixed-link phy device.
> 
> In of_phy_get_and_connect function, it help driver to get and register
> these PHYs handle.
> Therefore, here refactors this part by using of_phy_get_and_connect.

Hi Jacky,

I understand the aim of this patch, and I think it is nice that we
can drop about 20 lines of code. But I did have some trouble understanding
the paragraph above. I wonder if the following is clearer:

  Consolidate the handling of dedicated PHY and fixed-link phy by taking
  advantage of logic in of_phy_get_and_connect() which handles both of
  these cases, rather than open coding the same logic in ftgmac100_probe().

> 
> Signed-off-by: Jacky Chou <[email-masked]>
> ---
> v2:
>   - enable mac asym pause support for fixed-link PHY
>   - remove fixes information

I agree that this is not a fix. And should not have a Fixes tag and so on.
But as such it should be targeted at net rather than net-next.

  Subject: [net-next vX] ...

The code themselves changes look good to me. But I think the two points
above, in combination, warrant a v3.

-- 
pw-bot: changes-requested

...