Skip to contentSkip to conversation

arm, logbuffer: make it compileclean

PATCH Superseded Heiko Schocher 2 participants 3 messages Sep 15, 2011 – Oct 12, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm, logbuffer: make it compileclean

---
 arch/arm/lib/board.c |    5 ++++-
 common/cmd_log.c     |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/lib/board.c +4 -1
index a7fb251..f888548 100644
@@ -60,6 +60,10 @@
 #include "../drivers/net/lan91c96.h"
 #endif
 
+#if defined(CONFIG_LOGBUFFER)
+#include <logbuff.h>
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 ulong monitor_flash_len;
@@ -78,7 +82,6 @@ extern void rtl8019_get_enetaddr (uchar * addr);
 #include <i2c.h>
 #endif
 
-
 /************************************************************************
  * Coloured LED functionality
  ************************************************************************
common/cmd_log.c +1 -1
index 0e89357..249614f 100644
@@ -68,7 +68,7 @@ static char *lbuf;
 
 unsigned long __logbuffer_base(void)
 {
-	return CONFIG_SYS_SDRAM_BASE + gd->bd->bi_memsize - LOGBUFF_LEN;
+	return CONFIG_SYS_SDRAM_BASE + gd->ram_size - LOGBUFF_LEN;
 }
 unsigned long logbuffer_base (void) __attribute__((weak, alias("__logbuffer_base")));
 
Signature · 1 line
1.7.6
#1 lore raw

PATCH v2 1/1 arm, logbuffer: make it compileclean

---
- changes for v2:
- rebased against current TOT

checkpatch:
total: 0 errors, 0 warnings, 15 lines checked

0001-arm-logbuffer-make-it-compileclean.patch has no obvious style problems and is ready for submission.

 arch/arm/lib/board.c |    1 -
 common/cmd_log.c     |    2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)
arch/arm/lib/board.c +0 -1
index 705d4d2..b1974bf 100644
@@ -80,7 +80,6 @@ extern void rtl8019_get_enetaddr (uchar * addr);
 #include <i2c.h>
 #endif
 
-
 /************************************************************************
  * Coloured LED functionality
  ************************************************************************
common/cmd_log.c +1 -1
index 0e89357..249614f 100644
@@ -68,7 +68,7 @@ static char *lbuf;
 
 unsigned long __logbuffer_base(void)
 {
-	return CONFIG_SYS_SDRAM_BASE + gd->bd->bi_memsize - LOGBUFF_LEN;
+	return CONFIG_SYS_SDRAM_BASE + gd->ram_size - LOGBUFF_LEN;
 }
 unsigned long logbuffer_base (void) __attribute__((weak, alias("__logbuffer_base")));
 
Signature · 1 line
1.7.6.2
#2 lore raw

PATCH v2 1/1 arm, logbuffer: make it compileclean

arch/arm/lib/board.c extern void rtl8019_get_enetaddr (uchar * addr); · line 85

Quoted 10 lines · On Wednesday 12 October 2011 07:13:38 Heiko Schocher wrote:
arch/arm/lib/board.c +0 -1
@@ -80,7 +80,6 @@ extern void rtl8019_get_enetaddr (uchar * addr);
 #include <i2c.h>
 #endif
 
-
 /************************************************************************
  * Coloured LED functionality
  ************************************************************************

this looks like useless noise that checkpatch doesn't even complain about

common/cmd_log.c static char *lbuf; · line 72

Quoted 8 lines
common/cmd_log.c +1 -1
 
 unsigned long __logbuffer_base(void)
 {
-	return CONFIG_SYS_SDRAM_BASE + gd->bd->bi_memsize - LOGBUFF_LEN;
+	return CONFIG_SYS_SDRAM_BASE + gd->ram_size - LOGBUFF_LEN;
 }

i'm guessing avr32/microblaze not having ram_size in their global_data is a bug ? conversely, arm is the only arch that doesn't have bi_memsize in their board_data ...
-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/20111012/bb21d3bd/attachment.pgp