All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] CMC-PU2 compile fix
@ 2009-03-23 17:06 Ladislav Michl
  2009-03-23 17:26 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 2+ messages in thread
From: Ladislav Michl @ 2009-03-23 17:06 UTC (permalink / raw)
  To: u-boot

load_sernum_ethaddr.c:70: error: conflicting types for 'misc_init_r'
include/common.h:298: error: previous declaration of 'misc_init_r' was here
load_sernum_ethaddr.c: In function 'misc_init_r':
load_sernum_ethaddr.c:108: warning: implicit declaration of function 'eth_setenv_enetaddr'

(note that return value from misc_init_r is unused...)

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

diff --git a/board/cmc_pu2/load_sernum_ethaddr.c b/board/cmc_pu2/load_sernum_ethaddr.c
index 5ef9f20..eb5b52a 100644
--- a/board/cmc_pu2/load_sernum_ethaddr.c
+++ b/board/cmc_pu2/load_sernum_ethaddr.c
@@ -27,6 +27,7 @@
 /* #define DEBUG */
 
 #include <common.h>
+#include <net.h>
 
 #define I2C_CHIP	0x50	/* I2C bus address of onboard EEPROM */
 #define I2C_ALEN	1	/* length of EEPROM addresses in bytes */
@@ -66,7 +67,7 @@ int i2c_read (unsigned char chip, unsigned int addr, int alen,
  * Internal structure: see struct definition
  */
 
-void misc_init_r(void)
+int misc_init_r(void)
 {
 	struct manufacturer_data data;
 	char  serial [9];
@@ -80,7 +81,7 @@ void misc_init_r(void)
 	if (i2c_read(I2C_CHIP, I2C_OFFSET, I2C_ALEN, (unsigned char *)&data,
 		     sizeof(data)) != 0) {
 		puts ("Error reading manufacturer data from EEPROM\n");
-		return;
+		return 1;
 	}
 
 	/* check if manufacturer data block is valid  */
@@ -93,7 +94,7 @@ void misc_init_r(void)
 
 	if (chksum != data.chksum) {
 		puts ("Error: manufacturer data block has invalid checksum\n");
-		return;
+		return 1;
 	}
 
 	/* copy serial number */
@@ -107,4 +108,6 @@ void misc_init_r(void)
 	if (getenv("ethaddr") == NULL) {
 		eth_setenv_enetaddr("ethaddr", data.macadr);
 	}
+
+	return 0;
 }

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

* [U-Boot] [PATCH] CMC-PU2 compile fix
  2009-03-23 17:06 [U-Boot] [PATCH] CMC-PU2 compile fix Ladislav Michl
@ 2009-03-23 17:26 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-03-23 17:26 UTC (permalink / raw)
  To: u-boot

On 18:06 Mon 23 Mar     , Ladislav Michl wrote:
> load_sernum_ethaddr.c:70: error: conflicting types for 'misc_init_r'
> include/common.h:298: error: previous declaration of 'misc_init_r' was here
> load_sernum_ethaddr.c: In function 'misc_init_r':
> load_sernum_ethaddr.c:108: warning: implicit declaration of function 'eth_setenv_enetaddr'
> 
> (note that return value from misc_init_r is unused...)
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
already send tks
cmc_pu2: fix misc_init_r prototype

Best Regards,
J.

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

end of thread, other threads:[~2009-03-23 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-23 17:06 [U-Boot] [PATCH] CMC-PU2 compile fix Ladislav Michl
2009-03-23 17:26 ` Jean-Christophe PLAGNIOL-VILLARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.