All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] make hang() a weak function
Date: Tue, 16 Apr 2013 12:29:26 +0200	[thread overview]
Message-ID: <516D2806.4070902@denx.de> (raw)
In-Reply-To: <1366107249-24547-1-git-send-email-andreas.devel@googlemail.com>

Hi Andreas,

On 16.04.2013 12:14, Andreas Bie?mann wrote:
> This patch also does some minor coding style cleanups.
> 
> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> 
> ---
>  arch/arm/lib/board.c            |    3 ++-
>  arch/avr32/lib/board.c          |    3 ++-
>  arch/blackfin/lib/board.c       |    3 ++-
>  arch/m68k/lib/board.c           |    3 ++-
>  arch/microblaze/lib/board.c     |    5 +++--
>  arch/mips/lib/board.c           |    3 ++-
>  arch/nds32/lib/board.c          |    3 ++-
>  arch/nios2/lib/board.c          |    5 +++--
>  arch/openrisc/lib/board.c       |    3 ++-
>  arch/powerpc/lib/board.c        |    4 ++--
>  arch/sandbox/lib/board.c        |    3 ++-
>  arch/sh/lib/board.c             |    3 ++-
>  arch/sparc/lib/board.c          |    3 ++-
>  arch/x86/lib/board.c            |    3 ++-
>  common/board_f.c                |    3 ++-
>  common/spl/spl.c                |    3 ++-
>  drivers/mtd/nand/mxc_nand_spl.c |    3 ++-
>  17 files changed, 36 insertions(+), 20 deletions(-)
> 
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index 0521178..4a00e16 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -707,8 +707,9 @@ void board_init_r(gd_t *id, ulong dest_addr)
>  	/* NOTREACHED - no way out of command loop except booting */
>  }
>  
> -void hang(void)
> +void __hang(void)
>  {
>  	puts("### ERROR ### Please RESET the board ###\n");
>  	for (;;);
>  }
> +void hang(void) __attribute__((weak, alias("__hang")));

Please include "linux/compiler.h" and use:

void __weak hang(void)
{
	puts("### ERROR ### Please RESET the board ###\n");
	for (;;);
}

instead. No __attribute__ needed and easier to read.

Thanks,
Stefan

  reply	other threads:[~2013-04-16 10:29 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 [this message]
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   ` [U-Boot] [PATCH v2 2/5] nios2: " Andreas Bießmann
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=516D2806.4070902@denx.de \
    --to=sr@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.