Skip to contentSkip to conversation

common/cmd_load.c - Minor Code Style update & code cleanup

PATCH In review Gururaja Hebbar K R 3 participants 3 messages Aug 7, 2008 – Aug 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common/cmd_load.c - Minor Code Style update & code cleanup

- os_data_header Variable is a carry over feature & unused. So removed all instance of this variable
- Minor Code Style Update

---
 common/cmd_load.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
common/cmd_load.c +8 -7
index 1b75a7b..ab167f5 100644
@@ -424,7 +424,6 @@ write_record (char *buf)
 #define untochar(x) ((int) (((x) - SPACE) & 0xff))
 
 extern int os_data_count;
-extern int os_data_header[8];
 
 static void set_kerm_bin_mode(unsigned long *);
 static int k_recv(void);
@@ -631,11 +630,6 @@ void send_nack (int n)
 }
 
 
-/* os_data_* takes an OS Open image and puts it into memory, and
-   puts the boot header in an array named os_data_header
-
-   if image is binary, no header is stored in os_data_header.
-*/
 void (*os_data_init) (void);
 void (*os_data_char) (char new_char);
 static int os_data_state, os_data_state_saved;
@@ -643,25 +637,28 @@ int os_data_count;
 static int os_data_count_saved;
 static char *os_data_addr, *os_data_addr_saved;
 static char *bin_start_address;
-int os_data_header[8];
+
 static void bin_data_init (void)
 {
 	os_data_state = 0;
 	os_data_count = 0;
 	os_data_addr = bin_start_address;
 }
+
 static void os_data_save (void)
 {
 	os_data_state_saved = os_data_state;
 	os_data_count_saved = os_data_count;
 	os_data_addr_saved = os_data_addr;
 }
+
 static void os_data_restore (void)
 {
 	os_data_state = os_data_state_saved;
 	os_data_count = os_data_count_saved;
 	os_data_addr = os_data_addr_saved;
 }
+
 static void bin_data_char (char new_char)
 {
 	switch (os_data_state) {
@@ -671,6 +668,7 @@ static void bin_data_char (char new_char)
 		break;
 	}
 }
+
 static void set_kerm_bin_mode (unsigned long *addr)
 {
 	bin_start_address = (char *) addr;
@@ -686,16 +684,19 @@ void k_data_init (void)
 	k_data_escape = 0;
 	os_data_init ();
 }
+
 void k_data_save (void)
 {
 	k_data_escape_saved = k_data_escape;
 	os_data_save ();
 }
+
 void k_data_restore (void)
 {
 	k_data_escape = k_data_escape_saved;
 	os_data_restore ();
 }
+
 void k_data_char (char new_char)
 {
 	if (k_data_escape) {
Signature · 1 line
1.5.6.4
#2 lore raw

PATCH 1/1 common/cmd_load.c - Minor Code Style update & code cleanup

In reply to Gururaja Hebbar K R

Dear "Gururaja Hebbar K R",

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

- os_data_header Variable is a carry over feature & unused. So removed all instance of this variable
- Minor Code Style Update

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
Ever try. Ever fail. No matter. Try again. Fail again.  Fail  better.
                                                        -- S. Beckett