Re: [PATCH net-next v2 3/3] net: ethtool: Remove PHYLIB direct dependency

2020-07-07 Thread Michal Kubecek
On Mon, Jul 06, 2020 at 09:56:03PM +0200, Andrew Lunn wrote: > On Mon, Jul 06, 2020 at 11:40:00AM -0700, Jakub Kicinski wrote: > > On Sun, 5 Jul 2020 21:27:58 -0700 Florian Fainelli wrote: > > > + ops = ethtool_phy_ops; > > > + if (!ops || !ops->start_cable_test) { > > > > nit: don't think member

Re: [PATCH net-next v2 3/3] net: ethtool: Remove PHYLIB direct dependency

2020-07-06 Thread Andrew Lunn
On Mon, Jul 06, 2020 at 11:40:00AM -0700, Jakub Kicinski wrote: > On Sun, 5 Jul 2020 21:27:58 -0700 Florian Fainelli wrote: > > + ops = ethtool_phy_ops; > > + if (!ops || !ops->start_cable_test) { > > nit: don't think member-by-member checking is necessary. We don't > expect there to be any a

Re: [PATCH net-next v2 3/3] net: ethtool: Remove PHYLIB direct dependency

2020-07-06 Thread Jakub Kicinski
On Mon, 6 Jul 2020 11:45:38 -0700 Florian Fainelli wrote: > On 7/6/2020 11:40 AM, Jakub Kicinski wrote: > > On Sun, 5 Jul 2020 21:27:58 -0700 Florian Fainelli wrote: > >> + ops = ethtool_phy_ops; > >> + if (!ops || !ops->start_cable_test) { > > > > nit: don't think member-by-member checking

Re: [PATCH net-next v2 3/3] net: ethtool: Remove PHYLIB direct dependency

2020-07-06 Thread Florian Fainelli
On 7/6/2020 11:40 AM, Jakub Kicinski wrote: > On Sun, 5 Jul 2020 21:27:58 -0700 Florian Fainelli wrote: >> +ops = ethtool_phy_ops; >> +if (!ops || !ops->start_cable_test) { > > nit: don't think member-by-member checking is necessary. We don't > expect there to be any alternative versio

Re: [PATCH net-next v2 3/3] net: ethtool: Remove PHYLIB direct dependency

2020-07-06 Thread Jakub Kicinski
On Sun, 5 Jul 2020 21:27:58 -0700 Florian Fainelli wrote: > + ops = ethtool_phy_ops; > + if (!ops || !ops->start_cable_test) { nit: don't think member-by-member checking is necessary. We don't expect there to be any alternative versions of the ops, right? > + ret = -EOPNOTSUP

[PATCH net-next v2 3/3] net: ethtool: Remove PHYLIB direct dependency

2020-07-05 Thread Florian Fainelli
Now that we have introduced ethtool_phy_ops and the PHY library dynamically registers its operations with that function pointer, we can remove the direct PHYLIB dependency in favor of using dynamic operations. Signed-off-by: Florian Fainelli --- net/Kconfig | 1 - net/ethtool/cablet