public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] NET: Proper return code handling in eth_init() function in file eth.c
@ 2007-11-28  5:18 Upakul Barkakaty
  2007-11-28 15:39 ` Ben Warren
  0 siblings, 1 reply; 11+ messages in thread
From: Upakul Barkakaty @ 2007-11-28  5:18 UTC (permalink / raw)
  To: u-boot

NET: Proper return code handling in eth_init() function in file eth.c

This patch modifies the return code handling in the eth_init() function,
to be compatible with the handling of the return codes in the other
network stack files. It now returns a 0 on Success and -1 on error.

Signed-off-by: Upakul Barkakaty <upakul.barkakaty@conexant.com>

Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer **************************** 

"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." 

********************************************************************** 

---------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: eth.c.patch
Type: application/octet-stream
Size: 608 bytes
Desc: eth.c.patch
Url : http://lists.denx.de/pipermail/u-boot/attachments/20071128/9d73a764/attachment.obj 

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [U-Boot-Users] [PATCH] NET: Proper return code handling in eth_init() function in file eth.c
@ 2007-11-29  6:04 Upakul Barkakaty
  2007-11-29  6:24 ` Stefan Roese
  0 siblings, 1 reply; 11+ messages in thread
From: Upakul Barkakaty @ 2007-11-29  6:04 UTC (permalink / raw)
  To: u-boot

NET: Proper return code handling in eth_init() function in file eth.c

This patch modifies the return code handling in the eth_init()
function, to be compatible with the handling of the return codes in
the other network stack files. It now returns a 0 on Success and -1 on
error.

Signed-off-by: Upakul Barkakaty <upakul.barkakaty@conexant.com>

diff -Naur a/net/eth.c b/net/eth.c
--- a/net/eth.c	2007-11-26 09:53:55.000000000 +0530
+++ b/net/eth.c	2007-11-26 10:55:59.000000000 +0530
@@ -404,23 +404,23 @@
 	struct eth_device* old_current;

 	if (!eth_current)
-		return 0;
+		return -1;

 	old_current = eth_current;
 	do {
 		debug ("Trying %s\n", eth_current->name);

-		if (eth_current->init(eth_current, bis)) {
+		if (!eth_current->init(eth_current,bis))
+		{
 			eth_current->state = ETH_STATE_ACTIVE;
-
-			return 1;
+			return 0;
 		}
 		debug  ("FAIL\n");

 		eth_try_another(0);
 	} while (old_current != eth_current);

-	return 0;
+	return -1;
 }

 void eth_halt(void)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-01-08 21:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28  5:18 [U-Boot-Users] [PATCH] NET: Proper return code handling in eth_init() function in file eth.c Upakul Barkakaty
2007-11-28 15:39 ` Ben Warren
  -- strict thread matches above, loose matches on Subject: below --
2007-11-29  6:04 Upakul Barkakaty
2007-11-29  6:24 ` Stefan Roese
2007-11-29  6:46   ` Upakul Barkakaty
2008-01-08 14:26     ` Stefan Roese
2008-01-08 14:35       ` Upakul Barkakaty
2008-01-08 14:50       ` Upakul Barkakaty
2008-01-08 14:56         ` Ben Warren
2008-01-08 17:26           ` Stefan Roese
2008-01-08 21:10             ` Ben Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox