From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Thu, 14 Jul 2011 18:21:16 +0200 Subject: [U-Boot] [PATCH 1/2] arm, lib/board.c: Coding Style cleanup In-Reply-To: <1307088697-12159-2-git-send-email-hs@denx.de> References: <1307088697-12159-1-git-send-email-hs@denx.de> <1307088697-12159-2-git-send-email-hs@denx.de> Message-ID: <4E1F177C.3050105@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Heiko, Sorry for having kept this patch unanswered so long. I am now on holiday, which means *a bit* more time for U-Boot, so here comes: Re: patch title, can you make it "arm: libboard.c: ..." rather than "arm, libboard.c" ? Also, make sure you rebase onto latest u-boot-arm/master for next version: this one does not apply cleanly ATM. Le 03/06/2011 10:11, Heiko Schocher a ?crit : > --- 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"))); If you break the declaration in several lines, please leave some indentation in the second and subsequent lines. > +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, > @@ -485,34 +490,37 @@ void board_init_r (gd_t *id, ulong dest_addr) > mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN); > > #if !defined(CONFIG_SYS_NO_FLASH) > - puts ("Flash: "); > + puts("Flash: "); > > - if ((flash_size = flash_init ())> 0) { > + flash_size = flash_init(); > + if (flash_size> 0) { > # ifdef CONFIG_SYS_FLASH_CHECKSUM > - print_size (flash_size, ""); > + print_size(flash_size, ""); > /* > * Compute and print flash CRC if flashchecksum is set to 'y' > * > * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX > */ > - s = getenv ("flashchecksum"); > + s = getenv("flashchecksum"); > if (s&& (*s == 'y')) { > - printf (" CRC: %08X", > - crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size) > + printf(" CRC: %08X", > + crc32(0, > + (const unsigned char *) CONFIG_SYS_FLASH_BASE, > + flash_size) Pleas indent deeper for the last two lines that belong to the call to crc32. Amicalement, -- Albert.