wandboard: Return from cpu_eth_init() directly
PATCH 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.
--- 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 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 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.
--- board/freescale/mx6qarm2/mx6qarm2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
board/freescale/mx6qarm2/mx6qarm2.c +2 -6
@@ -186,13 +186,9 @@ int fecmxc_mii_postcall(int phy)int board_eth_init (bd_t *bis) {struct eth_device *dev; -int ret; - - ret =cpu_eth_init (bis); -if (ret) { -printf ("FEC MXC: %s:failed\n" , __func__); +int ret =cpu_eth_init (bis); +if (ret)return ret; - } dev =eth_get_dev_by_name ("FEC" );if (!dev) {
Signature · 1 line
1.8.1.2
PATCH 3/6 mx6qarm2: Remove unneeded error message when cpu_eth_init() fails
Dear Fabio Estevam,
board/freescale/mx6qarm2/mx6qarm2.c int fecmxc_mii_postcall(int phy) · line 191
Quoted 4 lines · In message <[email protected]> you wrote:
board/freescale/mx6qarm2/mx6qarm2.c +2
-0+int ret =cpu_eth_init (bis); +if (ret)return ret;
Please separate declarations and code by a blank line. Thanks.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de All men should freely use those seven words which have the power to make any marriage run smoothly: You know dear, you may be right.
PATCH 3/6 mx6qarm2: Remove unneeded error message when cpu_eth_init() fails
Hi Wolfgang,
Quoted 9 lines · Wolfgang Denk
Dear Fabio Estevam,
board/freescale/mx6qarm2/mx6qarm2.c int fecmxc_mii_postcall(int phy) · line 191
Quoted 4 lines · In message <[email protected]> you wrote:
board/freescale/mx6qarm2/mx6qarm2.c +2
-0+int ret =cpu_eth_init (bis); +if (ret)return ret;Please separate declarations and code by a blank line. Thanks.
Fixed in v2, thanks.
PATCH 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 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 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