Subject: RE: [PATCH net-next v3 1/7] net: ngbe: implement phylink to handle PHY device

From: Jiawen Wu <[email-masked]>
Date: Fri, 8 Dec 2023 15:12:46 +0800

On Wednesday, December 6, 2023 8:06 PM, Russell King (Oracle) wrote:
> On Wed, Dec 06, 2023 at 05:53:49PM +0800, Jiawen Wu wrote:
> > Add phylink support for Wangxun 1Gb Ethernet controller.
> >
> > Signed-off-by: Jiawen Wu <[email-masked]>
> > ---
> >  drivers/net/ethernet/wangxun/libwx/wx_type.h  |   8 ++
> >  drivers/net/ethernet/wangxun/ngbe/ngbe_main.c |  20 ++-
> >  drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.c | 126 +++++++++++-------
> >  drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.h |   2 +-
> >  4 files changed, 93 insertions(+), 63 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/wangxun/libwx/wx_type.h b/drivers/net/ethernet/wangxun/libwx/wx_type.h
> > index 165e82de772e..9225aaf029f8 100644
> > --- a/drivers/net/ethernet/wangxun/libwx/wx_type.h
> > +++ b/drivers/net/ethernet/wangxun/libwx/wx_type.h
> > @@ -8,6 +8,7 @@
> >  #include <linux/netdevice.h>
> >  #include <linux/if_vlan.h>
> >  #include <net/ip.h>
> > +#include <linux/phylink.h>
> 
> Nit: would be better to keep linux/ includes together (and in
> alphabetical order to prevent conflicts.)
> 
> > diff --git a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> > index 8db804543e66..c61f4b9d79fa 100644
> > --- a/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> > +++ b/drivers/net/ethernet/wangxun/ngbe/ngbe_main.c
> > @@ -9,6 +9,7 @@
> >  #include <linux/etherdevice.h>
> >  #include <net/ip.h>
> >  #include <linux/phy.h>
> > +#include <linux/phylink.h>
> >  #include <linux/if_vlan.h>
> >
> >  #include "../libwx/wx_type.h"
> 
> As wx_type.h includes linux/phylink.h, which is now fundamental for the
> definition of one of the structures in wx_type.h, the include of
> linux/phylink.h seems unnecessary here.

Should I remove the include of linux/phylink.h that have been added in other .c files?