> -----Original Message-----
> From: Gong Qianyu [mailto:qianyu.g...@freescale.com]
> Sent: Thursday, October 15, 2015 6:33 PM
> To: u-boot@lists.denx.de
> Cc: Hu Mingkai-B21284 <mingkai...@freescale.com>; Sun York-R58495
> <york...@freescale.com>; Hou Zhiqiang-B48286 <b48...@freescale.com>;
> Xie Shaohui-B21989 <shaohui....@freescale.com>; Song Wenbin-B53747
> <wenbin.s...@freescale.com>; Wood Scott-B07421
> <scottw...@freescale.com>; Kushwaha Prabhakar-B32579
> <prabha...@freescale.com>; Wang Huan-B18965
> <alison.w...@freescale.com>; Gong Qianyu-B52263
> <qianyu.g...@freescale.com>
> Subject: [Patch V5 07/17] net/fm: bug fix when CONFIG_PHYLIB not defined
> 
> From: Shaohui Xie <shaohui....@freescale.com>
> 
> phy_shutdown should be wrapped by CONFIG_PHYLIB.
> 
> Signed-off-by: Shaohui Xie <shaohui....@freescale.com>
> Signed-off-by: Mingkai Hu <mingkai...@freescale.com>
> Signed-off-by: Gong Qianyu <qianyu.g...@freescale.com>
> ---
> V5:
>  - No change.
> V4:
>  - No change.
> V3:
>  - New patch.
> 
>  drivers/net/fm/eth.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index
> d7d064b..1b62fd8 100644
> --- a/drivers/net/fm/eth.c
> +++ b/drivers/net/fm/eth.c
> @@ -483,8 +483,10 @@ static void fm_eth_halt(struct eth_device *dev)
>       /* disable bmi Rx port */
>       bmi_rx_port_disable(fm_eth->rx_port);
> 
> +#ifdef CONFIG_PHYLIB
>       if (fm_eth->phydev)
>               phy_shutdown(fm_eth->phydev);
> +#endif
>  }
> 
>  static int fm_eth_send(struct eth_device *dev, void *buf, int len)


Thanks for fixing the bug. 

I tried by #undef CONFIG_PHYLIB in drivers/net/fm/eth.c and got following 
warnings for B4860QDS_defconfig. 
I guess similar warning will be there for LS1043 also.  Can you please check 
and if required fix it.  

drivers/net/fm/eth.c: In function 'init_phy':
drivers/net/fm/eth.c:627:6: warning: unused variable 'supported' 
[-Wunused-variable]
  u32 supported;
      ^
drivers/net/fm/eth.c:626:21: warning: unused variable 'phydev' 
[-Wunused-variable]
  struct phy_device *phydev = NULL;
                     ^
drivers/net/fm/eth.c:625:17: warning: unused variable 'fm_eth' 
[-Wunused-variable]
  struct fm_eth *fm_eth = dev->priv;
                 ^
drivers/net/fm/eth.c: At top level:
drivers/net/fm/eth.c:84:13: warning: 'dtsec_init_phy' defined but not used 
[-Wunused-function]
 static void dtsec_init_phy(struct eth_device *dev)
             ^
drivers/net/fm/eth.c:99:12: warning: 'tgec_is_fibre' defined but not used 
[-Wunused-function]
 static int tgec_is_fibre(struct eth_device *dev)

--prabhakar
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to