From patchwork Fri Apr 19 08:48:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 237874 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 787DE2C0210 for ; Fri, 19 Apr 2013 18:48:49 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 80FCF4A3C3; Fri, 19 Apr 2013 10:48:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aIDeB6LGr6bx; Fri, 19 Apr 2013 10:48:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 687514A3A6; Fri, 19 Apr 2013 10:48:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 063284A3A6 for ; Fri, 19 Apr 2013 10:48:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6taokPYsLkSC for ; Fri, 19 Apr 2013 10:48:37 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-bk0-f45.google.com (mail-bk0-f45.google.com [209.85.214.45]) by theia.denx.de (Postfix) with ESMTPS id 692374A3A0 for ; Fri, 19 Apr 2013 10:48:31 +0200 (CEST) Received: by mail-bk0-f45.google.com with SMTP id j10so1628089bkw.18 for ; Fri, 19 Apr 2013 01:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=WkRkjsPt56n5Q2kBVbuVMlpvetgF3KNzqMbO7EFBdYE=; b=bPSRXdE0Gput02UOsTIxcxcXwFilrM7Vxq9eVXTx20IjUc/H3XHxA0T0ol5hQNSJKx /xhlWxDjAaJ00TrhzeMetJh+D4mJ5s9ynW11lvXs3bEEB3S3TnhDhuXeXB+5iGBCnw9N v+x+OgQeR/JJ59pTEqB7wkt2LjLoNRzBGqVVPxvIsoHjGPQieA2pdNeN+kcsDBnOyaZV M2ZjToFMm9o2v94EG1SWH+BB6sv1ui/jlFAMdaxyrKEF+R5dX/z8GJRXYeegxwgUuV4z f7Q//Jh+TZFcOmugEwh1yo6k+y6mKk5FJwWxcjwcsbj+itvy0T3J1xaynv/wpCfPPoL2 wwzw== X-Received: by 10.204.239.197 with SMTP id kx5mr5348643bkb.71.1366361310485; Fri, 19 Apr 2013 01:48:30 -0700 (PDT) Received: from localhost ([2a01:198:47b:1:210:75ff:fe1a:cd1e]) by mx.google.com with ESMTPS id fy17sm3819828bkc.6.2013.04.19.01.48.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Apr 2013 01:48:29 -0700 (PDT) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: U-Boot Mailing List Date: Fri, 19 Apr 2013 10:48:47 +0200 Message-Id: <1366361330-13852-3-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366361330-13852-1-git-send-email-andreas.devel@googlemail.com> References: <1366196568-23008-1-git-send-email-andreas.devel@googlemail.com> <1366361330-13852-1-git-send-email-andreas.devel@googlemail.com> MIME-Version: 1.0 Cc: Scott McNutt Subject: [U-Boot] [PATCH v3 2/5] nios2: fix style in board.c. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Make nios2's board.c checkpatch clean. Signed-off-by: Andreas Bießmann --- Changes in v3: None 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 (;;) + ; }