[U-Boot] [Patch V5 07/17] net/fm: bug fix when CONFIG_PHYLIB not defined
Kushwaha Prabhakar
prabhakar at freescale.com
Fri Oct 16 06:25:11 CEST 2015
> -----Original Message-----
> From: Gong Qianyu [mailto:Qianyu.Gong at freescale.com]
> Sent: Thursday, October 15, 2015 6:33 PM
> To: u-boot at lists.denx.de
> Cc: Hu Mingkai-B21284 <Mingkai.Hu at freescale.com>; Sun York-R58495
> <yorksun at freescale.com>; Hou Zhiqiang-B48286 <B48286 at freescale.com>;
> Xie Shaohui-B21989 <Shaohui.Xie at freescale.com>; Song Wenbin-B53747
> <Wenbin.Song at freescale.com>; Wood Scott-B07421
> <scottwood at freescale.com>; Kushwaha Prabhakar-B32579
> <prabhakar at freescale.com>; Wang Huan-B18965
> <alison.wang at freescale.com>; Gong Qianyu-B52263
> <Qianyu.Gong at freescale.com>
> Subject: [Patch V5 07/17] net/fm: bug fix when CONFIG_PHYLIB not defined
>
> From: Shaohui Xie <Shaohui.Xie at freescale.com>
>
> phy_shutdown should be wrapped by CONFIG_PHYLIB.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie at freescale.com>
> Signed-off-by: Mingkai Hu <Mingkai.Hu at freescale.com>
> Signed-off-by: Gong Qianyu <Qianyu.Gong at 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
More information about the U-Boot
mailing list