* [U-Boot] [PATCH 01/12] 4xx_enet: Fix return value of ppc_4xx_eth_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 02/12] bfin_EMAC: Fix return value of bfin_EMAC_initialize() Matthias Kaehlcke
` (10 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
4xx_enet: Return 1 from ppc_4xx_eth_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/4xx_enet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 2fac641..d61873d 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -2077,5 +2077,5 @@ int ppc_4xx_eth_initialize (bd_t * bis)
#endif
} /* end for each supported device */
- return 0;
+ return 1;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 02/12] bfin_EMAC: Fix return value of bfin_EMAC_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
2010-01-24 10:07 ` [U-Boot] [PATCH 01/12] 4xx_enet: Fix return value of ppc_4xx_eth_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 03/12] dnet: Fix return value of dnet_eth_initialize() Matthias Kaehlcke
` (9 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
bfin_EMAC: Return 1 from bfin_EMAC_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/bfin_mac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index ec45b63..f527c9c 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -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,
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 03/12] dnet: Fix return value of dnet_eth_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
2010-01-24 10:07 ` [U-Boot] [PATCH 01/12] 4xx_enet: Fix return value of ppc_4xx_eth_initialize() Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 02/12] bfin_EMAC: Fix return value of bfin_EMAC_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 04/12] fec_mxc: Fix return values of fec_probe() Matthias Kaehlcke
` (8 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
dnet: Return 1 from dnet_eth_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/dnet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c
index bfe87fa..6e7afc3 100644
--- a/drivers/net/dnet.c
+++ b/drivers/net/dnet.c
@@ -391,5 +391,5 @@ int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr)
eth_register(netdev);
- return 0;
+ return 1;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 04/12] fec_mxc: Fix return values of fec_probe()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (2 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 03/12] dnet: Fix return value of dnet_eth_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:59 ` Mike Frysinger
2010-01-24 10:07 ` [U-Boot] [PATCH 05/12] fsl_mcdmafec: Fix return value of mcdmafec_initialize() Matthias Kaehlcke
` (7 subsequent siblings)
11 siblings, 1 reply; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
fec_mxc: Return 1 from fec_probe() upon successfully initialization and 0 in
case of failure
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/fec_mxc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 19116f2..dc8a020 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -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)
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 05/12] fsl_mcdmafec: Fix return value of mcdmafec_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (3 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 04/12] fec_mxc: Fix return values of fec_probe() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 06/12] INCA IP: Fix return value of inca_switch_initialize() Matthias Kaehlcke
` (6 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
fsl_mcdmafec: Return 1 from mcdmafec_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/fsl_mcdmafec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index 35a6dfb..c26b297 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -584,5 +584,5 @@ int mcdmafec_initialize(bd_t * bis)
/* default speed */
bis->bi_ethspeed = 10;
- return 0;
+ return 1;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 06/12] INCA IP: Fix return value of inca_switch_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (4 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 05/12] fsl_mcdmafec: Fix return value of mcdmafec_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 07/12] lan91c96: Fix return value of lan91c96_initialize() Matthias Kaehlcke
` (5 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
INCA IP: Return 1 from inca_switch_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/inca-ip_sw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/inca-ip_sw.c b/drivers/net/inca-ip_sw.c
index 492f5ce..d579e4f 100644
--- a/drivers/net/inca-ip_sw.c
+++ b/drivers/net/inca-ip_sw.c
@@ -200,7 +200,7 @@ int inca_switch_initialize(bd_t * bis)
printf("Leaving inca_switch_initialize()\n");
#endif
- return 0;
+ return 1;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 07/12] lan91c96: Fix return value of lan91c96_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (5 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 06/12] INCA IP: Fix return value of inca_switch_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 08/12] macb: Fix return values of macb_eth_initialize() Matthias Kaehlcke
` (4 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
lan91c96: Return 1 from lan91c96_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/lan91c96.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 90e4002..d255179 100644
--- a/drivers/net/lan91c96.c
+++ b/drivers/net/lan91c96.c
@@ -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;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 08/12] macb: Fix return values of macb_eth_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (6 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 07/12] lan91c96: Fix return value of lan91c96_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:59 ` Mike Frysinger
2010-01-24 10:07 ` [U-Boot] [PATCH 09/12] mcffec: Fix return value of mcffec_initialize() Matthias Kaehlcke
` (3 subsequent siblings)
11 siblings, 1 reply; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
macb: Return 1 from macb_eth_initialize() upon successful initialization and 0
in case of failure
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/macb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c184353..e2a0724 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -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
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 09/12] mcffec: Fix return value of mcffec_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (7 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 08/12] macb: Fix return values of macb_eth_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:07 ` [U-Boot] [PATCH 10/12] plb2800: Fix return values of plb2800_eth_initialize() Matthias Kaehlcke
` (2 subsequent siblings)
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
mcffec: Return the number of initialized devices from mcffec_initialize()
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/mcffec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index 64be5de..6043ca1 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -622,5 +622,5 @@ int mcffec_initialize(bd_t * bis)
/* default speed */
bis->bi_ethspeed = 10;
- return 0;
+ return i;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 10/12] plb2800: Fix return values of plb2800_eth_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (8 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 09/12] mcffec: Fix return value of mcffec_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:58 ` [U-Boot] [PATCH 10/12] plb2800: Fix return values of plb2800_eth_initialize () Mike Frysinger
2010-01-24 10:07 ` [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize() Matthias Kaehlcke
2010-01-24 10:08 ` [U-Boot] [PATCH 12/12] smc91111: Fix return value of smc91111_initialize() Matthias Kaehlcke
11 siblings, 1 reply; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
plb2800: Return 1 from plb2800_eth_initialize() upon successful initialization
and 0 in case of failure
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/plb2800_eth.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/plb2800_eth.c b/drivers/net/plb2800_eth.c
index d799c73..ccbced2 100644
--- a/drivers/net/plb2800_eth.c
+++ b/drivers/net/plb2800_eth.c
@@ -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)
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (9 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 10/12] plb2800: Fix return values of plb2800_eth_initialize() Matthias Kaehlcke
@ 2010-01-24 10:07 ` Matthias Kaehlcke
2010-01-24 10:57 ` Mike Frysinger
2010-01-24 10:08 ` [U-Boot] [PATCH 12/12] smc91111: Fix return value of smc91111_initialize() Matthias Kaehlcke
11 siblings, 1 reply; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:07 UTC (permalink / raw)
To: u-boot
sh_eth: Return 1 from sh_eth_initialize() upon successful initialization and
0 in case of failure
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/sh_eth.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 86cc324..330c17c 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -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));
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize()
2010-01-24 10:07 ` [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize() Matthias Kaehlcke
@ 2010-01-24 10:57 ` Mike Frysinger
2010-01-24 13:10 ` Matthias Kaehlcke
0 siblings, 1 reply; 17+ messages in thread
From: Mike Frysinger @ 2010-01-24 10:57 UTC (permalink / raw)
To: u-boot
On Sunday 24 January 2010 05:07:59 Matthias Kaehlcke wrote:
> --- a/drivers/net/sh_eth.c
> +++ b/drivers/net/sh_eth.c
> 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;
> }
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
^ permalink raw reply [flat|nested] 17+ messages in thread* [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize()
2010-01-24 10:57 ` Mike Frysinger
@ 2010-01-24 13:10 ` Matthias Kaehlcke
0 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 13:10 UTC (permalink / raw)
To: u-boot
Hi Mike,
El Sun, Jan 24, 2010 at 05:57:52AM -0500 Mike Frysinger ha dit:
> On Sunday 24 January 2010 05:07:59 Matthias Kaehlcke wrote:
> > --- a/drivers/net/sh_eth.c
> > +++ b/drivers/net/sh_eth.c
> > 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;
> > }
>
> these are error paths and thus should be -1
you are right if Ben makes the change in net/eth.c he proposed
--
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 `-
^ permalink raw reply [flat|nested] 17+ messages in thread
* [U-Boot] [PATCH 12/12] smc91111: Fix return value of smc91111_initialize()
[not found] <cover.1264327272.git.matthias@kaehlcke.net>
` (10 preceding siblings ...)
2010-01-24 10:07 ` [U-Boot] [PATCH 11/12] sh_eth: Fix return value of sh_eth_initialize() Matthias Kaehlcke
@ 2010-01-24 10:08 ` Matthias Kaehlcke
11 siblings, 0 replies; 17+ messages in thread
From: Matthias Kaehlcke @ 2010-01-24 10:08 UTC (permalink / raw)
To: u-boot
smc91111: Return 1 from smc91111_initialize() upon successful initialization
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
---
drivers/net/smc91111.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 54a1bfb..528efb1 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -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;
}
--
1.6.3.1
^ permalink raw reply related [flat|nested] 17+ messages in thread