[U-Boot] [PATCH v2 01/02] cosmetic: arm: libboard.c: Coding Style cleanup

2011-07-15 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
Acked-by: Detlev Zundel d...@denx.de
cc: Albert Aribaud albert.u.b...@aribaud.net
cc: macp...@gmail.com

---
changes for v2:
  Added Acked-by from Detlev Zundel
  Added comments from Albert Aribaud:
- fixed some Codingstyle issues
- changed subject title
  Added comment from macp...@gmail.com:
- Add cosmetic to subject title


 arch/arm/lib/board.c |  216 ++
 1 files changed, 111 insertions(+), 105 deletions(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index fc52a26..8b11eb1 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -92,26 +92,28 @@ extern void rtl8019_get_enetaddr (uchar * addr);
  
  * May be supplied by boards if desired
  */
-void inline __coloured_LED_init (void) {}
-void coloured_LED_init (void) __attribute__((weak, 
alias(__coloured_LED_init)));
-void inline __red_LED_on (void) {}
-void red_LED_on (void) __attribute__((weak, alias(__red_LED_on)));
-void inline __red_LED_off(void) {}
+inline void __coloured_LED_init(void) {}
+void coloured_LED_init(void)
+   __attribute__((weak, alias(__coloured_LED_init)));
+inline void __red_LED_on(void) {}
+void red_LED_on(void) __attribute__((weak, alias(__red_LED_on)));
+inline void __red_LED_off(void) {}
 void red_LED_off(void) __attribute__((weak, alias(__red_LED_off)));
-void inline __green_LED_on(void) {}
+inline void __green_LED_on(void) {}
 void green_LED_on(void) __attribute__((weak, alias(__green_LED_on)));
-void inline __green_LED_off(void) {}
+inline void __green_LED_off(void) {}
 void green_LED_off(void) __attribute__((weak, alias(__green_LED_off)));
-void inline __yellow_LED_on(void) {}
+inline void __yellow_LED_on(void) {}
 void yellow_LED_on(void) __attribute__((weak, alias(__yellow_LED_on)));
-void inline __yellow_LED_off(void) {}
+inline void __yellow_LED_off(void) {}
 void yellow_LED_off(void) __attribute__((weak, alias(__yellow_LED_off)));
-void inline __blue_LED_on(void) {}
+inline void __blue_LED_on(void) {}
 void blue_LED_on(void) __attribute__((weak, alias(__blue_LED_on)));
-void inline __blue_LED_off(void) {}
+inline void __blue_LED_off(void) {}
 void blue_LED_off(void) __attribute__((weak, alias(__blue_LED_off)));
 
-/
+/*
+ 
  * Init Utilities  *
  
  * Some of this code should be moved into the core functions,
@@ -122,30 +124,30 @@ void blue_LED_off(void) __attribute__((weak, 
alias(__blue_LED_off)));
 #if defined(CONFIG_ARM_DCC)  !defined(CONFIG_BAUDRATE)
 #define CONFIG_BAUDRATE 115200
 #endif
-static int init_baudrate (void)
+static int init_baudrate(void)
 {
char tmp[64];   /* long enough for environment variables */
-   int i = getenv_f(baudrate, tmp, sizeof (tmp));
+   int i = getenv_f(baudrate, tmp, sizeof(tmp));
 
gd-baudrate = (i  0)
-   ? (int) simple_strtoul (tmp, NULL, 10)
+   ? (int) simple_strtoul(tmp, NULL, 10)
: CONFIG_BAUDRATE;
 
return (0);
 }
 
-static int display_banner (void)
+static int display_banner(void)
 {
-   printf (\n\n%s\n\n, version_string);
-   debug (U-Boot code: %08lX - %08lX  BSS: - %08lX\n,
+   printf(\n\n%s\n\n, version_string);
+   debug(U-Boot code: %08lX - %08lX  BSS: - %08lX\n,
   _TEXT_BASE,
-  _bss_start_ofs+_TEXT_BASE, _bss_end_ofs+_TEXT_BASE);
+  _bss_start_ofs + _TEXT_BASE, _bss_end_ofs + _TEXT_BASE);
 #ifdef CONFIG_MODEM_SUPPORT
-   debug (Modem Support enabled\n);
+   debug(Modem Support enabled\n);
 #endif
 #ifdef CONFIG_USE_IRQ
-   debug (IRQ Stack: %08lx\n, IRQ_STACK_START);
-   debug (FIQ Stack: %08lx\n, FIQ_STACK_START);
+   debug(IRQ Stack: %08lx\n, IRQ_STACK_START);
+   debug(FIQ Stack: %08lx\n, FIQ_STACK_START);
 #endif
 
return (0);
@@ -158,23 +160,23 @@ static int display_banner (void)
  * gives a simple yet clear indication which part of the
  * initialization if failing.
  */
-static int display_dram_config (void)
+static int display_dram_config(void)
 {
int i;
 
 #ifdef DEBUG
-   puts (RAM Configuration:\n);
+   puts(RAM Configuration:\n);
 
-   for(i=0; iCONFIG_NR_DRAM_BANKS; i++) {
-   printf (Bank #%d: %08lx , i, gd-bd-bi_dram[i].start);
-   print_size (gd-bd-bi_dram[i].size, \n);
+   for (i = 0; i  CONFIG_NR_DRAM_BANKS; i++) {
+   printf(Bank #%d: %08lx , i, gd-bd-bi_dram[i].start);
+   print_size(gd-bd-bi_dram[i].size, \n);
}
 #else
ulong size = 0;
 
-   for (i=0; iCONFIG_NR_DRAM_BANKS; i++) {
+   for (i = 0; i  

Re: [U-Boot] [PATCH v2 01/02] cosmetic: arm: libboard.c: Coding Style cleanup

2011-07-15 Thread Wolfgang Denk
Dear Heiko Schocher,

In message 1310713420-6076-1-git-send-email...@denx.de you wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 Acked-by: Detlev Zundel d...@denx.de
 cc: Albert Aribaud albert.u.b...@aribaud.net
 cc: macp...@gmail.com
 
 ---
 changes for v2:
   Added Acked-by from Detlev Zundel
   Added comments from Albert Aribaud:
 - fixed some Codingstyle issues
 - changed subject title
   Added comment from macp...@gmail.com:
 - Add cosmetic to subject title
 
 
  arch/arm/lib/board.c |  216 
 ++
  1 files changed, 111 insertions(+), 105 deletions(-)

Sorry, but libboard.c appears to be wrong.  Should this not be
lib/board.c instead?

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: w...@denx.de
The philosophy exam was a piece of cake  -  which  was  a  bit  of  a
surprise, actually, because I was expecting some questions on a sheet
of paper.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 01/02] cosmetic: arm: libboard.c: Coding Style cleanup

2011-07-15 Thread Heiko Schocher
Hello Wolfgang,

Wolfgang Denk wrote:
 Dear Heiko Schocher,
 
 In message 1310713420-6076-1-git-send-email...@denx.de you wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 Acked-by: Detlev Zundel d...@denx.de
 cc: Albert Aribaud albert.u.b...@aribaud.net
 cc: macp...@gmail.com

 ---
 changes for v2:
   Added Acked-by from Detlev Zundel
   Added comments from Albert Aribaud:
 - fixed some Codingstyle issues
 - changed subject title
   Added comment from macp...@gmail.com:
 - Add cosmetic to subject title


  arch/arm/lib/board.c |  216 
 ++
  1 files changed, 111 insertions(+), 105 deletions(-)
 
 Sorry, but libboard.c appears to be wrong.  Should this not be
 lib/board.c instead?

Hehe, you are right, I just copypasted from Alberts comment ;-)

Fixed! (waiting for some more coments before posting v3)

bye,
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot