[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250212193632.GC4383@debian>
Date: Wed, 12 Feb 2025 20:36:32 +0100
From: Dimitri Fedrau <dima.fedrau@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: dimitri.fedrau@...bherr.com, 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>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Andrew Davis <afd@...com>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Florian Fainelli <f.fainelli@...il.com>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v4 2/3] net: phy: Add helper for getting tx
amplitude gain
Am Wed, Feb 12, 2025 at 02:15:08PM +0100 schrieb Andrew Lunn:
> > @@ -3133,12 +3126,12 @@ static int phy_get_int_delay_property(struct device *dev, const char *name)
> > s32 phy_get_internal_delay(struct phy_device *phydev, struct device *dev,
> > const int *delay_values, int size, bool is_rx)
> > {
> > - s32 delay;
> > - int i;
> > + u32 delay;
> > + int i, ret;
>
> Networking uses reverse christmass tree. So you need to sort these two
> longest first.
>
Will fix it.
> > +int phy_get_tx_amplitude_gain(struct phy_device *phydev, struct device *dev,
> > + enum ethtool_link_mode_bit_indices linkmode,
> > + u32 *val)
>
> Since this is an exported symbol, it would be nice to have some
> kerneldoc for it.
>
Yes.
> > +{
> > + switch (linkmode) {
> > + case ETHTOOL_LINK_MODE_100baseT_Full_BIT:
> > + return phy_get_u32_property(dev,
> > + "tx-amplitude-100base-tx-percent",
> > + val);
>
> So no handling of the default value here. This would be the logical
> place to have the 100 if the value is not in device tree.
>
I will get rid of the default value.
> > + default:
> > + return -EINVAL;
> > + }
> > +}
> > +EXPORT_SYMBOL(phy_get_tx_amplitude_gain);
>
> I would prefer EXPORT_SYMBOL_GPL, but up to you.
>
Ok.
Best regards,
Dimitri Fedrau
Powered by blists - more mailing lists