From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] arm, lib/board.c: Coding Style cleanup
Date: Thu, 14 Jul 2011 18:21:16 +0200 [thread overview]
Message-ID: <4E1F177C.3050105@aribaud.net> (raw)
In-Reply-To: <1307088697-12159-2-git-send-email-hs@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.
next prev parent reply other threads:[~2011-07-14 16:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 8:11 [U-Boot] [PATCH 0/2] arm: cleanup board code Heiko Schocher
2011-06-03 8:11 ` [U-Boot] [PATCH 1/2] arm, lib/board.c: Coding Style cleanup Heiko Schocher
2011-06-06 11:09 ` Detlev Zundel
2011-07-14 16:21 ` Albert ARIBAUD [this message]
2011-07-15 0:17 ` 馬克泡
2011-07-15 6:57 ` Heiko Schocher
2011-07-15 7:03 ` [U-Boot] [PATCH v2 01/02] cosmetic: arm: libboard.c: " Heiko Schocher
2011-07-15 7:22 ` Wolfgang Denk
2011-07-15 7:43 ` Heiko Schocher
2011-07-16 5:36 ` [U-Boot] [PATCH v3 01/02] cosmetic: arm: lib/board.c: " Heiko Schocher
2011-07-27 21:40 ` [U-Boot] [PATCH 1/2] arm, " Wolfgang Denk
2011-08-04 11:40 ` Albert ARIBAUD
2011-06-03 8:11 ` [U-Boot] [PATCH 2/2] arm, lib/board.c: use gd->ram_size instead of bd->bi_memsize Heiko Schocher
2011-08-05 6:09 ` Heiko Schocher
2011-08-12 17:56 ` Albert ARIBAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E1F177C.3050105@aribaud.net \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox