Skip to contentSkip to conversation

netloop: updates for NetLoop

PATCH Superseded Heiko Schocher 5 participants 16 messages Feb 25, 2009 – May 15, 2009 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in
common/cmd_nvedit.c
- moved some variables in fn scope instead of
file scope
- NetInitLoop now static void

---
 common/cmd_nvedit.c |    6 ++++++
 net/eth.c           |    5 ++---
 net/net.c           |    9 ++++-----
 3 files changed, 12 insertions(+), 8 deletions(-)
common/cmd_nvedit.c +6 -0
index 95eebb5..3caa841 100644
@@ -75,6 +75,12 @@ DECLARE_GLOBAL_DATA_PTR;
 static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
 #define	N_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
 
+/*
+ * This variable is incremented on each do_setenv (), so it can
+ * be used as an indication, if the environment has changed or not.
+ * So it is possible to reread an environment variable only if the
+ * environment was changed ... done so for example in NetInitLoop()
+ */
 static int env_id = 1;
 
 int get_env_id (void)
net/eth.c +2 -3
index 4bbf84b..a494912 100644
@@ -57,9 +57,6 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
 
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
 
-static char *act = NULL;
-static int  env_changed_id = 0;
-
 /*
  * CPU and board-specific Ethernet initializations.  Aliased function
  * signals caller to move on
@@ -471,6 +468,8 @@ void eth_try_another(int first_restart)
 #ifdef CONFIG_NET_MULTI
 void eth_set_current(void)
 {
+	static char *act = NULL;
+	static int  env_changed_id = 0;
 	struct eth_device* old_current;
 	int	env_id;
 
net/net.c +4 -5
index a89f6a0..a80c814 100644
@@ -209,8 +209,6 @@ uchar		NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
 ulong		NetArpWaitTimerStart;
 int		NetArpWaitTry;
 
-int		env_changed_id = 0;
-
 void ArpRequest (void)
 {
 	int i;
@@ -278,15 +276,16 @@ void ArpTimeoutCheck(void)
 	}
 }
 
-int
+static void
 NetInitLoop(proto_t protocol)
 {
+	static int	env_changed_id = 0;
 	bd_t *bd = gd->bd;
 	int env_id = get_env_id ();
 
 	/* update only when the environment has changed */
 	if (env_changed_id == env_id)
-		return 0;
+		return;
 
 	switch (protocol) {
 #if defined(CONFIG_CMD_NFS)
@@ -347,7 +346,7 @@ NetInitLoop(proto_t protocol)
 		break;
 	}
 	env_changed_id = env_id;
-	return 0;
+	return;
 }
 
 /**********************************************************************/
Signature · 5 lines
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#1 lore raw

PATCH 1/1 netloop: updates for NetLoop

Quoted 6 lines · On Wednesday 25 February 2009 07:40:45 Heiko Schocher wrote:

+/*
+ * This variable is incremented on each do_setenv (), so it can
+ * be used as an indication, if the environment has changed or not.
+ * So it is possible to reread an environment variable only if the
+ * environment was changed ... done so for example in NetInitLoop()
+ */

i would tweak it to say "... it can be used via get_env_id() as an ..."

net/net.c NetInitLoop(proto_t protocol) · line 350

Quoted 3 lines
net/net.c +1 -1
-	return 0;
+	return;
 }

a return at the end of a function is pointless imo. just delete it.
-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/20090225/0c8747d6/attachment.pgp

#2 lore raw

PATCH v2 1/1 netloop: updates for NetLoop

[PATCH v2] netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

---
changes since v1:
- added comments from Mike Frysinger

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    8 +++-----
 3 files changed, 12 insertions(+), 8 deletions(-)
common/cmd_nvedit.c +7 -0
index 95eebb5..30e296c 100644
@@ -75,6 +75,13 @@ DECLARE_GLOBAL_DATA_PTR;
 static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
 #define	N_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
 
+/*
+ * This variable is incremented on each do_setenv (), so it can
+ * be used via get_env_id() as an indication, if the environment
+ * has changed or not. So it is possible to reread an environment
+ * variable only if the environment was changed ... done so for
+ * example in NetInitLoop()
+ */
 static int env_id = 1;
 
 int get_env_id (void)
net/eth.c +2 -3
index 4bbf84b..a494912 100644
@@ -57,9 +57,6 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
 
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
 
-static char *act = NULL;
-static int  env_changed_id = 0;
-
 /*
  * CPU and board-specific Ethernet initializations.  Aliased function
  * signals caller to move on
@@ -471,6 +468,8 @@ void eth_try_another(int first_restart)
 #ifdef CONFIG_NET_MULTI
 void eth_set_current(void)
 {
+	static char *act = NULL;
+	static int  env_changed_id = 0;
 	struct eth_device* old_current;
 	int	env_id;
 
net/net.c +3 -5
index a89f6a0..0887f6e 100644
@@ -209,8 +209,6 @@ uchar		NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
 ulong		NetArpWaitTimerStart;
 int		NetArpWaitTry;
 
-int		env_changed_id = 0;
-
 void ArpRequest (void)
 {
 	int i;
@@ -278,15 +276,16 @@ void ArpTimeoutCheck(void)
 	}
 }
 
-int
+static void
 NetInitLoop(proto_t protocol)
 {
+	static int	env_changed_id = 0;
 	bd_t *bd = gd->bd;
 	int env_id = get_env_id ();
 
 	/* update only when the environment has changed */
 	if (env_changed_id == env_id)
-		return 0;
+		return;
 
 	switch (protocol) {
 #if defined(CONFIG_CMD_NFS)
@@ -347,7 +346,6 @@ NetInitLoop(proto_t protocol)
 		break;
 	}
 	env_changed_id = env_id;
-	return 0;
 }
 
 /**********************************************************************/
Signature · 5 lines
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#3 lore raw

PATCH v2 1/1 netloop: updates for NetLoop

Quoted 11 lines · On Thursday 26 February 2009 02:16:52 Heiko Schocher wrote:

[PATCH v2] netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

-mike

#4 lore raw

PATCH v2 1/1 netloop: updates for NetLoop

In reply to Heiko Schocher

Dear Ben,

Quoted 11 lines · In message <[email protected]> you wrote:

[PATCH v2] netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Quoted 8 lines

---
changes since v1:
- added comments from Mike Frysinger

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    8 +++-----
 3 files changed, 12 insertions(+), 8 deletions(-)

Except for an Ack from Mike I did not see any comments?

Ditto for this one:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/55341

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
Children are natural mimics who act like their parents despite  every
effort to teach them good manners.
#6 lore raw

PATCH v2 1/1 netloop: updates for NetLoop

In reply to Wolfgang Denk

Dear Ben,

Quoted 23 lines · In message <[email protected]> I wrote:

Dear Ben,

Quoted 11 lines · In message <[email protected]> you wrote:

[PATCH v2] netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Quoted 8 lines

---
changes since v1:
- added comments from Mike Frysinger

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    8 +++-----
 3 files changed, 12 insertions(+), 8 deletions(-)
Quoted 5 lines

Except for an Ack from Mike I did not see any comments?

Ditto for this one:

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/55341

Please comment -- if you want, I can apply directly.

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
I mean, I . . . think to understand you, I just don't know  what  you
are saying ...                        - Terry Pratchett, _Soul Music_
#7 lore raw

PATCH v2 1/1 netloop: updates for NetLoop

Hi Wolfgang,

Quoted 32 lines · Wolfgang Denk

Dear Ben,

Quoted 28 lines · In message <[email protected]> I wrote:

Dear Ben,

Quoted 11 lines · In message <[email protected]> you wrote:

[PATCH v2] netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Quoted 9 lines

---
changes since v1:
- added comments from Mike Frysinger

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    8 +++-----
 3 files changed, 12 insertions(+), 8 deletions(-)

Except for an Ack from Mike I did not see any comments?

Ditto for this one:

Quoted 9 lines
Quoted 2 lines

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/55341

Please comment -- if you want, I can apply directly.

Best regards,

Wolfgang Denk

Sorry, thought I was caught up. This looks good - please apply directly.

thanks,
Ben

#8 lore raw

PATCH v2 1/1 netloop: updates for NetLoop

In reply to Heiko Schocher

Dear Heiko Schocher,

Quoted 6 lines · In message <[email protected]> you wrote:

[PATCH v2] netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

Quoted 8 lines

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

---
changes since v1:
- added comments from Mike Frysinger

I'm sorry, but this does not apply any more. Can you please rebase it?

Thanks.

Best regards,

Wolfgang Denk

Signature · 4 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
I must follow the people.  Am I not their leader? - Benjamin Disraeli
#9 lore raw

PATCH v3 1/1 netloop: updates for NetLoop

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

---
changes since v1:
- added comments from Mike Frysinger

changes since v2:
- rebased against current head, commit
28afe0160f87ff74574150d703055a965f91422a

---
 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    7 +++----
 3 files changed, 12 insertions(+), 7 deletions(-)
common/cmd_nvedit.c +7 -0
index 163765a..3ee971a 100644
@@ -77,6 +77,13 @@ SPI_FLASH|MG_DISK|NVRAM|NOWHERE}
 static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
 #define	N_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
 
+/*
+ * This variable is incremented on each do_setenv (), so it can
+ * be used via get_env_id() as an indication, if the environment
+ * has changed or not. So it is possible to reread an environment
+ * variable only if the environment was changed ... done so for
+ * example in NetInitLoop()
+ */
 static int env_id = 1;
 
 int get_env_id (void)
net/eth.c +2 -3
index c6fa5b9..8940ebf 100644
@@ -57,9 +57,6 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
 
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
 
-static char *act = NULL;
-static int  env_changed_id = 0;
-
 /*
  * CPU and board-specific Ethernet initializations.  Aliased function
  * signals caller to move on
@@ -471,6 +468,8 @@ void eth_try_another(int first_restart)
 #ifdef CONFIG_NET_MULTI
 void eth_set_current(void)
 {
+	static char *act = NULL;
+	static int  env_changed_id = 0;
 	struct eth_device* old_current;
 	int	env_id;
 
net/net.c +3 -4
index b8648bd..5637cf5 100644
@@ -209,8 +209,6 @@ uchar		NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
 ulong		NetArpWaitTimerStart;
 int		NetArpWaitTry;
 
-int		env_changed_id = 0;
-
 void ArpRequest (void)
 {
 	int i;
@@ -278,9 +276,10 @@ void ArpTimeoutCheck(void)
 	}
 }
 
-int
+static void
 NetInitLoop(proto_t protocol)
 {
+	static int env_changed_id = 0;
 	bd_t *bd = gd->bd;
 	int env_id = get_env_id ();
 
@@ -295,7 +294,7 @@ NetInitLoop(proto_t protocol)
 		env_changed_id = env_id;
 	}
 
-	return 0;
+	return;
 }
 
 /**********************************************************************/
Signature · 5 lines
1.6.0.6

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#10 lore raw

PATCH v3 1/1 netloop: updates for NetLoop

Hi Heiko,

Quoted 10 lines · Heiko Schocher

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Please put your real e-mail address here.

Also, can you please verify that everything still works fine when this patch is applied to net/next? It has Michael Zaidman's "NetLoop initialization bug" fix applied.

thanks,
Ben

#11 lore raw

PATCH v3 1/1 netloop: updates for NetLoop

Hello Ben,

Quoted 5 lines · Ben Warren
Quoted 4 lines · Heiko Schocher

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

Quoted 7 lines
Quoted 6 lines

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Please put your real e-mail address here.

Ups, sorry, send a new one ...

Quoted 3 lines

Also, can you please verify that everything still works fine when this patch is applied to net/next? It has Michael Zaidman's "NetLoop initialization bug" fix applied.

This patch from Michael is also in actual u-boot.git, so I tested my patch with actual u-boot.git, on a mpc8xx, mpc82xx and on a mpc83xx based board, without showing the bug which Michael's patch fixed, so it seems to work fine.

bye
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#12 lore raw

PATCH v4 1/1 netloop: updates for NetLoop

In reply to Ben Warren

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

---
changes since v1:
- added comments from Mike Frysinger

changes since v2:
- rebased against current head, commit
28afe0160f87ff74574150d703055a965f91422a

changes since v3:
- corrected my EMail address, as Ben Warren suggested.

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    7 +++----
 3 files changed, 12 insertions(+), 7 deletions(-)
common/cmd_nvedit.c +7 -0
index 163765a..3ee971a 100644
@@ -77,6 +77,13 @@ SPI_FLASH|MG_DISK|NVRAM|NOWHERE}
 static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
 #define	N_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
 
+/*
+ * This variable is incremented on each do_setenv (), so it can
+ * be used via get_env_id() as an indication, if the environment
+ * has changed or not. So it is possible to reread an environment
+ * variable only if the environment was changed ... done so for
+ * example in NetInitLoop()
+ */
 static int env_id = 1;
 
 int get_env_id (void)
net/eth.c +2 -3
index c6fa5b9..8940ebf 100644
@@ -57,9 +57,6 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
 
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
 
-static char *act = NULL;
-static int  env_changed_id = 0;
-
 /*
  * CPU and board-specific Ethernet initializations.  Aliased function
  * signals caller to move on
@@ -471,6 +468,8 @@ void eth_try_another(int first_restart)
 #ifdef CONFIG_NET_MULTI
 void eth_set_current(void)
 {
+	static char *act = NULL;
+	static int  env_changed_id = 0;
 	struct eth_device* old_current;
 	int	env_id;
 
net/net.c +3 -4
index b8648bd..5637cf5 100644
@@ -209,8 +209,6 @@ uchar		NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
 ulong		NetArpWaitTimerStart;
 int		NetArpWaitTry;
 
-int		env_changed_id = 0;
-
 void ArpRequest (void)
 {
 	int i;
@@ -278,9 +276,10 @@ void ArpTimeoutCheck(void)
 	}
 }
 
-int
+static void
 NetInitLoop(proto_t protocol)
 {
+	static int env_changed_id = 0;
 	bd_t *bd = gd->bd;
 	int env_id = get_env_id ();
 
@@ -295,7 +294,7 @@ NetInitLoop(proto_t protocol)
 		env_changed_id = env_id;
 	}
 
-	return 0;
+	return;
 }
 
 /**********************************************************************/
Signature · 4 lines
1.6.0.6
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#13 lore raw

PATCH v4 1/1 netloop: updates for NetLoop

Wolfgang,

Quoted 10 lines · Heiko Schocher

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

Quoted 84 lines

---
changes since v1:
- added comments from Mike Frysinger

changes since v2:
- rebased against current head, commit
28afe0160f87ff74574150d703055a965f91422a

changes since v3:
- corrected my EMail address, as Ben Warren suggested.

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    7 +++----
 3 files changed, 12 insertions(+), 7 deletions(-)
common/cmd_nvedit.c +7 -0
index 163765a..3ee971a 100644
@@ -77,6 +77,13 @@ SPI_FLASH|MG_DISK|NVRAM|NOWHERE}
 static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
 #define	N_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
 
+/*
+ * This variable is incremented on each do_setenv (), so it can
+ * be used via get_env_id() as an indication, if the environment
+ * has changed or not. So it is possible to reread an environment
+ * variable only if the environment was changed ... done so for
+ * example in NetInitLoop()
+ */
 static int env_id = 1;
 
 int get_env_id (void)
net/eth.c +2 -3
index c6fa5b9..8940ebf 100644
@@ -57,9 +57,6 @@ int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
 
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
 
-static char *act = NULL;
-static int  env_changed_id = 0;
-
 /*
  * CPU and board-specific Ethernet initializations.  Aliased function
  * signals caller to move on
@@ -471,6 +468,8 @@ void eth_try_another(int first_restart)
 #ifdef CONFIG_NET_MULTI
 void eth_set_current(void)
 {
+	static char *act = NULL;
+	static int  env_changed_id = 0;
 	struct eth_device* old_current;
 	int	env_id;
 
net/net.c +2 -3
index b8648bd..5637cf5 100644
@@ -209,8 +209,6 @@ uchar		NetArpWaitPacketBuf[PKTSIZE_ALIGN + PKTALIGN];
 ulong		NetArpWaitTimerStart;
 int		NetArpWaitTry;
 
-int		env_changed_id = 0;
-
 void ArpRequest (void)
 {
 	int i;
@@ -278,9 +276,10 @@ void ArpTimeoutCheck(void)
 	}
 }
 
-int
+static void
 NetInitLoop(proto_t protocol)
 {
+	static int env_changed_id = 0;
 	bd_t *bd = gd->bd;
 	int env_id = get_env_id ();
 

net/net.c NetInitLoop(proto_t protocol) · line 300

Quoted 8 lines
net/net.c +1 -1
@@ -295,7 +294,7 @@ NetInitLoop(proto_t protocol)
 		env_changed_id = env_id;
 	}
 
-	return 0;
+	return;
 }
 
 /**********************************************************************/

Please apply directly.

regards,
Ben

#14 lore raw

PATCH v4 1/1 netloop: updates for NetLoop

Dear Ben Warren,

Quoted 13 lines · In message <[email protected]> you wrote:
Quoted 10 lines · Heiko Schocher

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

...

Quoted 1 line

Please apply directly.

Done, thanks.

Best regards,

Wolfgang Denk

Signature · 6 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
The complexity of software is an essential property, not an  acciden-
tal  one. Hence, descriptions of a software entity that abstract away
its complexity often abstract away its essence.    - Fred Brooks, Jr.
#15 lore raw

PATCH v4 1/1 netloop: updates for NetLoop

In reply to Heiko Schocher

Dear Heiko Schocher,

Quoted 17 lines · In message <[email protected]> you wrote:

Fix some issues introduced from commit:
2f70c49e5b9813635ad73666aa30f304c7fdeda9
suggested by Mike Frysinger.

- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void

---
changes since v1:
- added comments from Mike Frysinger

changes since v2:
- rebased against current head, commit
28afe0160f87ff74574150d703055a965f91422a

Quoted 7 lines

changes since v3:
- corrected my EMail address, as Ben Warren suggested.

 common/cmd_nvedit.c |    7 +++++++
 net/eth.c           |    5 ++---
 net/net.c           |    7 +++----
 3 files changed, 12 insertions(+), 7 deletions(-)

Applied, 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
Business is like a wheelbarrow. Nothing ever happens until you  start
pushing.