From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] nios2: fix style in board.c.
Date: Wed, 17 Apr 2013 13:02:45 +0200 [thread overview]
Message-ID: <1366196568-23008-3-git-send-email-andreas.devel@googlemail.com> (raw)
In-Reply-To: <1366196568-23008-1-git-send-email-andreas.devel@googlemail.com>
Make nios2's board.c checkpatch clean.
Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
---
Changes in v2: None
arch/nios2/lib/board.c | 43 +++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 22 deletions(-)
diff --git a/arch/nios2/lib/board.c b/arch/nios2/lib/board.c
index 1e495d4..0f2bc7e 100644
--- a/arch/nios2/lib/board.c
+++ b/arch/nios2/lib/board.c
@@ -64,7 +64,6 @@ typedef int (init_fnc_t) (void);
***********************************************************************/
init_fnc_t *init_sequence[] = {
-
#if defined(CONFIG_BOARD_EARLY_INIT_F)
board_early_init_f, /* Call board-specific init code early.*/
#endif
@@ -83,7 +82,7 @@ init_fnc_t *init_sequence[] = {
/***********************************************************************/
-void board_init (void)
+void board_init(void)
{
bd_t *bd;
init_fnc_t **init_fnc_ptr;
@@ -93,7 +92,7 @@ void board_init (void)
/* Pointer is writable since we allocated a register for it. */
gd = &gd_data;
/* compiler optimization barrier needed for GCC >= 3.4 */
- __asm__ __volatile__("": : :"memory");
+ __asm__ __volatile__("" : : : "memory");
gd->bd = &bd_data;
gd->baudrate = CONFIG_BAUDRATE;
@@ -106,25 +105,24 @@ void board_init (void)
bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
#endif
#if defined(CONFIG_SYS_SRAM_BASE) && defined(CONFIG_SYS_SRAM_SIZE)
- bd->bi_sramstart= CONFIG_SYS_SRAM_BASE;
+ bd->bi_sramstart = CONFIG_SYS_SRAM_BASE;
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;
#endif
bd->bi_baudrate = CONFIG_BAUDRATE;
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
- WATCHDOG_RESET ();
- if ((*init_fnc_ptr) () != 0) {
- hang ();
- }
+ WATCHDOG_RESET();
+ if ((*init_fnc_ptr) () != 0)
+ hang();
}
- WATCHDOG_RESET ();
+ WATCHDOG_RESET();
/* The Malloc area is immediately below the monitor copy in RAM */
mem_malloc_init(CONFIG_SYS_MALLOC_BASE, CONFIG_SYS_MALLOC_LEN);
#ifndef CONFIG_SYS_NO_FLASH
- WATCHDOG_RESET ();
+ WATCHDOG_RESET();
bd->bi_flashsize = flash_init();
#endif
@@ -138,39 +136,40 @@ void board_init (void)
mmc_initialize(bd);
#endif
- WATCHDOG_RESET ();
+ WATCHDOG_RESET();
env_relocate();
- WATCHDOG_RESET ();
+ WATCHDOG_RESET();
stdio_init();
jumptable_init();
console_init_r();
- WATCHDOG_RESET ();
- interrupt_init ();
+ WATCHDOG_RESET();
+ interrupt_init();
#if defined(CONFIG_BOARD_LATE_INIT)
- board_late_init ();
+ board_late_init();
#endif
#if defined(CONFIG_CMD_NET)
- puts ("Net: ");
- eth_initialize (bd);
+ puts("Net: ");
+ eth_initialize(bd);
#endif
/* main_loop */
for (;;) {
- WATCHDOG_RESET ();
- main_loop ();
+ WATCHDOG_RESET();
+ main_loop();
}
}
/***********************************************************************/
-void hang (void)
+void hang(void)
{
- disable_interrupts ();
+ disable_interrupts();
puts("### ERROR ### Please reset board ###\n");
- for (;;);
+ for (;;)
+ ;
}
--
1.7.10.4
next prev parent reply other threads:[~2013-04-17 11:02 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 10:14 [U-Boot] [PATCH] make hang() a weak function Andreas Bießmann
2013-04-16 10:29 ` Stefan Roese
2013-04-16 11:10 ` Graeme Russ
2013-04-16 11:36 ` Albert ARIBAUD
2013-04-16 11:45 ` Andreas Bießmann
2013-04-16 12:22 ` Wolfgang Denk
2013-04-16 12:58 ` Andreas Bießmann
2013-04-16 13:05 ` Wolfgang Denk
2013-04-16 13:32 ` Andreas Bießmann
2013-04-16 13:35 ` Graeme Russ
2013-04-16 14:15 ` Andreas Bießmann
2013-04-16 14:20 ` Graeme Russ
2013-04-16 14:23 ` Wolfgang Denk
2013-04-16 14:40 ` Andreas Bießmann
2013-04-16 15:14 ` Wolfgang Denk
2013-04-16 15:34 ` Andreas Bießmann
2013-04-16 16:00 ` Wolfgang Denk
2013-04-16 16:14 ` Andreas Bießmann
2013-04-16 14:17 ` Wolfgang Denk
2013-04-17 11:02 ` [U-Boot] [PATCH v2 0/5] consolidate hang() Andreas Bießmann
2013-04-17 11:02 ` [U-Boot] [PATCH v2 1/5] microblaze: fix style in board.c Andreas Bießmann
2013-04-17 11:44 ` Michal Simek
2013-04-17 11:54 ` Andreas Bießmann
2013-04-17 11:56 ` Michal Simek
2013-04-17 11:02 ` Andreas Bießmann [this message]
2013-04-17 11:02 ` [U-Boot] [PATCH v2 3/5] mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT Andreas Bießmann
2013-04-17 11:02 ` [U-Boot] [PATCH v2 4/5] tx25: " Andreas Bießmann
2013-04-17 11:02 ` [U-Boot] [PATCH v2 5/5] lib: consolidate hang() Andreas Bießmann
2013-04-17 12:58 ` Benoît Thébaudeau
2013-04-18 19:40 ` [U-Boot] [PATCH v2 0/5] " Wolfgang Denk
2013-04-19 8:48 ` [U-Boot] [PATCH v3 " Andreas Bießmann
2013-04-19 8:48 ` [U-Boot] [PATCH v3 1/5] microblaze: fix style in board.c Andreas Bießmann
2013-04-19 8:48 ` [U-Boot] [PATCH v3 2/5] nios2: " Andreas Bießmann
2013-04-19 8:48 ` [U-Boot] [PATCH v3 3/5] mx31pdk: add CONFIG_SPL_LIBGENERIC_SUPPORT Andreas Bießmann
2013-04-19 8:48 ` [U-Boot] [PATCH v3 4/5] tx25: " Andreas Bießmann
2013-04-19 9:00 ` Benoît Thébaudeau
2013-04-19 9:43 ` Andreas Bießmann
2013-04-19 8:48 ` [U-Boot] [PATCH v3 5/5] lib: consolidate hang() Andreas Bießmann
2013-04-19 8:57 ` Albert ARIBAUD
2013-05-02 16:05 ` Tom Rini
2013-04-25 21:44 ` [U-Boot] [PATCH v3 0/5] " Simon Glass
2013-05-02 16:06 ` Tom Rini
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=1366196568-23008-3-git-send-email-andreas.devel@googlemail.com \
--to=andreas.devel@googlemail.com \
--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