wandboard: Return from cpu_eth_init() directly
PATCH v2 1/6 wandboard: Return from cpu_eth_init() directly
From: Fabio Estevam <[email protected]>
There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it.
In order to simplify the code, just return the value from cpu_eth_init(bis) directly.
---
Changes since v1:
- None
board/wandboard/wandboard.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
board/wandboard/wandboard.c +1 -7
@@ -257,15 +257,9 @@ static void setup_display(void)int board_eth_init (bd_t *bis) { -int ret; -setup_iomux_enet (); - ret =cpu_eth_init (bis); -if (ret) -printf ("FEC MXC: %s:failed\n" , __func__); - -return ret; +return cpu_eth_init (bis); }int board_early_init_f (void )
Signature · 1 line
1.8.1.2
PATCH v2 2/6 titanium: Return from cpu_eth_init() directly
From: Fabio Estevam <[email protected]>
There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it.
In order to simplify the code, just return the value from cpu_eth_init(bis) directly.
--- board/barco/titanium/titanium.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
board/barco/titanium/titanium.c +1 -7
@@ -264,15 +264,9 @@ int board_phy_config(struct phy_device *phydev)int board_eth_init (bd_t *bis) { -int ret; -setup_iomux_enet (); - ret =cpu_eth_init (bis); -if (ret) -printf ("FEC MXC: %s:failed\n" , __func__); - -return ret; +return cpu_eth_init (bis); }int board_early_init_f (void )
Signature · 1 line
1.8.1.2
PATCH v2 2/6 titanium: Return from cpu_eth_init() directly
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
There is no need to print an error message when
cpu_eth_init()fails becausenet/eth.calready prints it.In order to simplify the code, just return the value from
cpu_eth_init(bis)directly.Cc Stefan Roese <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Thanks,
Stefan
PATCH v2 3/6 mx6qarm2: Remove unneeded error message when cpu_eth_init() fails
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it.
---
Changes since v1:
- Separate declarations and code by a blank line
board/freescale/mx6qarm2/mx6qarm2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +2 -5
@@ -186,13 +186,10 @@ int fecmxc_mii_postcall(int phy)int board_eth_init (bd_t *bis) {struct eth_device *dev; -int ret; +int ret =cpu_eth_init (bis); - ret =cpu_eth_init (bis); -if (ret) { -printf ("FEC MXC: %s:failed\n" , __func__); +if (ret)return ret; - } dev =eth_get_dev_by_name ("FEC" );if (!dev) {
Signature · 1 line
1.8.1.2
PATCH v2 4/6 mx6qsabreauto: Return from cpu_eth_init() directly
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it.
In order to simplify the code, just return the value from cpu_eth_init(bis) directly.
--- board/freescale/mx6qsabreauto/mx6qsabreauto.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
board/freescale/mx6qsabreauto/mx6qsabreauto.c +1 -7
@@ -192,15 +192,9 @@ int board_phy_config(struct phy_device *phydev)int board_eth_init (bd_t *bis) { -int ret; -setup_iomux_enet (); - ret =cpu_eth_init (bis); -if (ret) -printf ("FEC MXC: %s:failed\n" , __func__); - -return ret; +return cpu_eth_init (bis); }#define BOARD_REV_B 0x200
Signature · 1 line
1.8.1.2
PATCH v2 5/6 mx6sabresd: Return from cpu_eth_init() directly
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it.
In order to simplify the code, just return the value from cpu_eth_init(bis) directly.
--- board/freescale/mx6sabresd/mx6sabresd.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
board/freescale/mx6sabresd/mx6sabresd.c +1 -7
@@ -453,15 +453,9 @@ int overwrite_console(void)int board_eth_init (bd_t *bis) { -int ret; -setup_iomux_enet (); - ret =cpu_eth_init (bis); -if (ret) -printf ("FEC MXC: %s:failed\n" , __func__); - -return ret; +return cpu_eth_init (bis); }int board_early_init_f (void )
Signature · 1 line
1.8.1.2
PATCH v2 6/6 mx6slevk: Return from cpu_eth_init() directly
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
There is no need to print an error message when cpu_eth_init() fails because net/eth.c already prints it.
In order to simplify the code, just return the value from cpu_eth_init(bis) directly.
--- board/freescale/mx6slevk/mx6slevk.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
board/freescale/mx6slevk/mx6slevk.c +1 -9
@@ -106,17 +106,9 @@ int board_mmc_init(bd_t *bis)#ifdef CONFIG_FEC_MXC int board_eth_init (bd_t *bis) { -int ret; -setup_iomux_fec (); - ret =cpu_eth_init (bis); -if (ret) { -printf ("FEC MXC: %s:failed\n" , __func__); -return ret; - } - -return 0 ; +return cpu_eth_init (bis); }static int setup_fec (void )
Signature · 1 line
1.8.1.2
PATCH v2 1/6 wandboard: Return from cpu_eth_init() directly
In reply to Fabio EstevamQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
There is no need to print an error message when
cpu_eth_init()fails becausenet/eth.calready prints it.In order to simplify the code, just return the value from
cpu_eth_init(bis)directly.Signed-off-by Fabio Estevam <[email protected]>---
Applied (whole series) to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================