4xx_enet: Fix return value of ppc_4xx_eth_initialize()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/12 4xx_enet: Fix return value of ppc_4xx_eth_initialize()
4xx_enet: Return 1 from ppc_4xx_eth_initialize() upon successful initialization
--- drivers/net/4xx_enet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/4xx_enet.c +1 -1
@@ -2077,5 +2077,5 @@ int ppc_4xx_eth_initialize (bd_t * bis)#endif }/* end for each supported device */ -return 0 ; +return 1 ; }
Signature · 1 line
1.6.3.1
PATCH 2/12 bfin_EMAC: Fix return value of bfin_EMAC_initialize()
In reply to a message not in the archivebfin_EMAC: Return 1 from bfin_EMAC_initialize() upon successful initialization
--- drivers/net/bfin_mac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/bfin_mac.c +1 -1
@@ -113,7 +113,7 @@ int bfin_EMAC_initialize(bd_t *bis)miiphy_register (dev->name, bfin_miiphy_read, bfin_miiphy_write);#endif -return 0 ; +return 1 ; } static int bfin_EMAC_send(struct eth_device *dev, volatile void *packet,
Signature · 1 line
1.6.3.1
PATCH 3/12 dnet: Fix return value of dnet_eth_initialize()
In reply to a message not in the archivednet: Return 1 from dnet_eth_initialize() upon successful initialization
--- drivers/net/dnet.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/dnet.c +1 -1
@@ -391,5 +391,5 @@ int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)eth_register (netdev); -return 0 ; +return 1 ; }
Signature · 1 line
1.6.3.1
PATCH 4/12 fec_mxc: Fix return values of fec_probe()
In reply to a message not in the archivefec_mxc: Return 1 from fec_probe() upon successfully initialization and 0 in case of failure
--- drivers/net/fec_mxc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/fec_mxc.c +2 -2
@@ -667,7 +667,7 @@ static int fec_probe(bd_t *bd) edev = (struct eth_device *)malloc (sizeof (struct eth_device ));if (!edev) {puts ("fec_imx27: not enough malloc memory!\n" ); -return -ENOMEM ; +return 0 ; } edev->priv = fec; edev->init = fec_init;
@@ -732,7 +732,7 @@ static int fec_probe(bd_t *bd)memcpy (edev->enetaddr, ethaddr,6 );fec_set_hwaddr (edev, ethaddr); -return 0 ; +return 1 ; }int fecmxc_initialize (bd_t *bd)
Signature · 1 line
1.6.3.1
PATCH 4/12 fec_mxc: Fix return values of fec_probe()
drivers/net/fec_mxc.c static int fec_probe(bd_t *bd) · line 671
Quoted 9 lines · On Sunday 24 January 2010 05:07:29 Matthias Kaehlcke wrote:
drivers/net/fec_mxc.c +1
-1@@ -667,7 +667,7 @@ static int fec_probe(bd_t *bd) edev = (struct eth_device *)malloc (sizeof (struct eth_device ));if (!edev) {puts ("fec_imx27: not enough malloc memory!\n" ); -return -ENOMEM ; +return 0 ; }
error path should return -1, not 0
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100124/3bf31079/attachment.pgp
PATCH 5/12 fsl_mcdmafec: Fix return value of mcdmafec_initialize()
In reply to a message not in the archivefsl_mcdmafec: Return 1 from mcdmafec_initialize() upon successful initialization
--- drivers/net/fsl_mcdmafec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/fsl_mcdmafec.c +1 -1
@@ -584,5 +584,5 @@ int mcdmafec_initialize(bd_t * bis)/* default speed */ bis->bi_ethspeed =10 ; -return 0 ; +return 1 ; }
Signature · 1 line
1.6.3.1
PATCH 6/12 INCA IP: Fix return value of inca_switch_initialize()
In reply to a message not in the archiveINCA IP: Return 1 from inca_switch_initialize() upon successful initialization
--- drivers/net/inca-ip_sw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/inca-ip_sw.c +1 -1
@@ -200,7 +200,7 @@ int inca_switch_initialize(bd_t * bis)printf ("Leaving inca_switch_initialize()\n" );#endif -return 0 ; +return 1 ; }
Signature · 1 line
1.6.3.1
PATCH 7/12 lan91c96: Fix return value of lan91c96_initialize()
In reply to a message not in the archivelan91c96: Return 1 from lan91c96_initialize() upon successful initialization
--- drivers/net/lan91c96.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/lan91c96.c +1 -1
@@ -817,5 +817,5 @@ int lan91c96_initialize(u8 dev_num, int base_addr)sprintf (dev->name,"%s-%hu" , supported_chips[r].name, dev_num);eth_register (dev); -return 0 ; +return 1 ; }
Signature · 1 line
1.6.3.1
PATCH 8/12 macb: Fix return values of macb_eth_initialize()
In reply to a message not in the archivemacb: Return 1 from macb_eth_initialize() upon successful initialization and 0 in case of failure
--- drivers/net/macb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/macb.c +2 -2
@@ -500,7 +500,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr) macb =malloc (sizeof (struct macb_device ));if (!macb) {printf ("Error: Failed to allocate memory for MACB%d\n" , id); -return -1 ; +return 0 ; }memset (macb,0 ,sizeof (struct macb_device ));
@@ -542,7 +542,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr)eth_register (netdev); - return 0; + return 1; }#endif
Signature · 1 line
1.6.3.1
PATCH 8/12 macb: Fix return values of macb_eth_initialize()
drivers/net/macb.c int macb_eth_initialize(int id, void *regs, unsigned · line 504
Quoted 9 lines · On Sunday 24 January 2010 05:07:46 Matthias Kaehlcke wrote:
drivers/net/macb.c +1
-1@@ -500,7 +500,7 @@ int macb_eth_initialize(int id, void *regs, unsigned int phy_addr) macb = malloc(sizeof(struct macb_device));if (!macb) {printf ("Error: Failed to allocate memory for MACB%d\n" , id); -return -1 ; +return 0 ; }
this is an error path thus the current code is correct
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100124/9cd210ad/attachment.pgp
PATCH 9/12 mcffec: Fix return value of mcffec_initialize()
In reply to a message not in the archivemcffec: Return the number of initialized devices from mcffec_initialize()
--- drivers/net/mcffec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/mcffec.c +1 -1
@@ -622,5 +622,5 @@ int mcffec_initialize(bd_t * bis)/* default speed */ bis->bi_ethspeed =10 ; -return 0 ; +return i; }
Signature · 1 line
1.6.3.1
PATCH 10/12 plb2800: Fix return values of plb2800_eth_initialize()
In reply to a message not in the archiveplb2800: Return 1 from plb2800_eth_initialize() upon successful initialization and 0 in case of failure
--- drivers/net/plb2800_eth.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/plb2800_eth.c +2 -2
@@ -106,7 +106,7 @@ int plb2800_eth_initialize(bd_t * bis)if (!(dev = (struct eth_device *)malloc (sizeof *dev))) {printf ("Failed to allocate memory\n" ); -return -1 ; +return 0 ; }memset (dev,0 ,sizeof (*dev));
@@ -141,7 +141,7 @@ int plb2800_eth_initialize(bd_t * bis)printf ("Leaving plb2800_eth_initialize()\n" );#endif -return 0 ; +return 1 ; }static int plb2800_eth_init (struct eth_device *dev,bd_t * bis)
Signature · 1 line
1.6.3.1
PATCH 10/12 plb2800: Fix return values of plb2800_eth_initialize ()
drivers/net/plb2800_eth.c int plb2800_eth_initialize(bd_t * bis) · line 110
Quoted 9 lines · On Sunday 24 January 2010 05:07:55 Matthias Kaehlcke wrote:
drivers/net/plb2800_eth.c +1
-1@@ -106,7 +106,7 @@ int plb2800_eth_initialize(bd_t * bis)if (!(dev = (struct eth_device *)malloc (sizeof *dev))) {printf ("Failed to allocate memory\n" ); -return -1 ; +return 0 ; }
this is an error path, thus current value is correct
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100124/4fba7812/attachment.pgp
PATCH 11/12 sh_eth: Fix return value of sh_eth_initialize()
In reply to a message not in the archivesh_eth: Return 1 from sh_eth_initialize() upon successful initialization and 0 in case of failure
--- drivers/net/sh_eth.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/sh_eth.c +3 -3
@@ -627,21 +627,21 @@ void sh_eth_halt(struct eth_device *dev)int sh_eth_initialize (bd_t *bd) { -int ret =0 ; +int ret =1 ;struct sh_eth_dev *eth =NULL ;struct eth_device *dev =NULL ; eth = (struct sh_eth_dev *)malloc (sizeof (struct sh_eth_dev ));if (!eth) {printf (SHETHER_NAME ": %s: malloc failed\n" , __func__); - ret = -ENOMEM ; + ret =0 ; goto err; } dev = (struct eth_device *)malloc (sizeof (struct eth_device ));if (!dev) {printf (SHETHER_NAME ": %s: malloc failed\n" , __func__); - ret = -ENOMEM ; + ret =0 ; goto err; }memset (dev,0 ,sizeof (struct eth_device ));
Signature · 1 line
1.6.3.1
PATCH 11/12 sh_eth: Fix return value of sh_eth_initialize()
Quoted 7 lines · On Sunday 24 January 2010 05:07:59 Matthias Kaehlcke wrote:
drivers/net/sh_eth.c +1
-1eth = (struct sh_eth_dev *)malloc (sizeof (struct sh_eth_dev ));if (!eth) {printf (SHETHER_NAME ": %s: malloc failed\n" , __func__); - ret = -ENOMEM ; + ret =0 ;
drivers/net/sh_eth.c void sh_eth_halt(struct eth_device *dev) · line 646
Quoted 10 lines
drivers/net/sh_eth.c +1
-1goto err; } dev = (struct eth_device *)malloc (sizeof (struct eth_device ));if (!dev) {printf (SHETHER_NAME ": %s: malloc failed\n" , __func__); - ret = -ENOMEM ; + ret =0 ; goto err; }
these are error paths and thus should be -1
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100124/23f3a6c3/attachment.pgp
PATCH 11/12 sh_eth: Fix return value of sh_eth_initialize()
Hi Mike,
El Sun, Jan 24, 2010 at 05:57:52AM -0500 Mike Frysinger ha dit:
Quoted 11 lines · On Sunday 24 January 2010 05:07:59 Matthias Kaehlcke wrote:
Quoted 10 lines
drivers/net/sh_eth.c +1
-1eth = (struct sh_eth_dev *)malloc (sizeof (struct sh_eth_dev ));if (!eth) {printf (SHETHER_NAME ": %s: malloc failed\n" , __func__); - ret = -ENOMEM ; + ret =0 ; goto err; }
Quoted 9 lines
drivers/net/sh_eth.c void sh_eth_halt(struct eth_device *dev) · line 646
Quoted 7 lines
dev = (struct eth_device *)malloc(sizeof(struct eth_device));drivers/net/sh_eth.c +1
-1if (!dev) {printf (SHETHER_NAME ": %s: malloc failed\n" , __func__); - ret = -ENOMEM ; + ret =0 ; goto err; }these are error paths and thus should be -1
you are right if Ben makes the change in net/eth.c he proposed
Signature · 12 lines
Matthias Kaehlcke
Embedded Linux Developer
Barcelona
Representation of the world, like the world itself, is
the work of men; they describe it from their own point
of view, which they confuse with the absolute truth
(Simone de Beauvoir)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-PATCH 12/12 smc91111: Fix return value of smc91111_initialize()
In reply to a message not in the archivesmc91111: Return 1 from smc91111_initialize() upon successful initialization
--- drivers/net/smc91111.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/smc91111.c +1 -1
@@ -1377,5 +1377,5 @@ int smc91111_initialize(u8 dev_num, int base_addr)sprintf (dev->name,"%s-%hu" ,SMC_DEV_NAME , dev_num);eth_register (dev); -return 0 ; +return 1 ; }
Signature · 1 line
1.6.3.1