public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 26/31] powerpc: mgcoge, mgsuvd, kmeter1: dont print errormsg if second IVM Block lacks..
@ 2009-01-28  9:40 Heiko Schocher
  2009-01-28 12:09 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Schocher @ 2009-01-28  9:40 UTC (permalink / raw)
  To: u-boot

The second IVM inventory block for the keymile boards is optional
only, so dont print an error message, if this block dont exists.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 board/keymile/common/common.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index a282421..1904482 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -204,8 +204,9 @@ static int ivm_check_crc (unsigned char *buf, int block)
 	crceeprom = (buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN - 1] + \
 			buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN - 2] * 256);
 	if (crc != crceeprom) {
-		printf ("Error CRC Block: %d EEprom: calculated: %lx EEprom: %lx\n",
-			block, crc, crceeprom);
+		if (block == 0)
+			printf ("Error CRC Block: %d EEprom: calculated: \
+				%lx EEprom: %lx\n", block, crc, crceeprom);
 		return -1;
 	}
 	return 0;
@@ -288,7 +289,7 @@ int ivm_analyze_eeprom (unsigned char *buf, int len)
 	GET_STRING("IVM_CustomerProductID", IVM_POS_CUSTOMER_PROD_ID, 32)

 	if (ivm_check_crc (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN * 2], 2) != 0)
-		return -2;
+		return 0;
 	ivm_analyze_block2 (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN * 2], CONFIG_SYS_IVM_EEPROM_PAGE_LEN);

 	return 0;
-- 
1.6.0.6

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

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

* [U-Boot] [PATCH 26/31] powerpc: mgcoge, mgsuvd, kmeter1: dont print errormsg if second IVM Block lacks..
  2009-01-28  9:40 [U-Boot] [PATCH 26/31] powerpc: mgcoge, mgsuvd, kmeter1: dont print errormsg if second IVM Block lacks Heiko Schocher
@ 2009-01-28 12:09 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2009-01-28 12:09 UTC (permalink / raw)
  To: u-boot

Dear Heiko Schocher,

In message <4980281A.1010105@denx.de> you wrote:
> The second IVM inventory block for the keymile boards is optional
> only, so dont print an error message, if this block dont exists.

PLEASE provide somewhat usable commit messages.

Keep in mind that the Subject line is used as summary for the commit,
and that it must not exceed some 70 characters.

Event though you use a very long subject it still makes no sense.

Please fix.

Best regards,

Wolfgang Denk

-- 
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
Premature optimization is the root of all evil.         -- D.E. Knuth

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

end of thread, other threads:[~2009-01-28 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28  9:40 [U-Boot] [PATCH 26/31] powerpc: mgcoge, mgsuvd, kmeter1: dont print errormsg if second IVM Block lacks Heiko Schocher
2009-01-28 12:09 ` Wolfgang Denk

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