Re: [net-next PATCH v1 2/7] net: phy: Introduce phy related fwnode functions

2020-09-30 Thread Calvin Johnson
On Wed, Sep 30, 2020 at 03:03:49PM -0700, David Miller wrote: > From: Calvin Johnson > Date: Wed, 30 Sep 2020 21:34:25 +0530 > > > +struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode) > > +{ > > + struct device *d; > > + struct mdio_device *mdiodev; > > Please use rev

Re: [net-next PATCH v1 2/7] net: phy: Introduce phy related fwnode functions

2020-09-30 Thread David Miller
From: Calvin Johnson Date: Wed, 30 Sep 2020 21:34:25 +0530 > +struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode) > +{ > + struct device *d; > + struct mdio_device *mdiodev; Please use reverse christmas tree ordering for local variables.

[net-next PATCH v1 2/7] net: phy: Introduce phy related fwnode functions

2020-09-30 Thread Calvin Johnson
Define fwnode_phy_find_device() to iterate an mdiobus and find the phy device of the provided phy fwnode. Additionally define device_phy_find_device() to find phy device of provided device. Define fwnode_get_phy_node() to get phy_node using named reference. Signed-off-by: Calvin Johnson --- dr