All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <biessmann@corscience.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] avr32: fix timer_init() return type
Date: Thu, 13 Oct 2011 09:38:05 +0200	[thread overview]
Message-ID: <4E96955D.8080407@corscience.de> (raw)
In-Reply-To: <1318482666-20394-1-git-send-email-vapier@gentoo.org>

Dear Mike,

Am 13.10.2011 07:11, schrieb Mike Frysinger:
> The common.h header says this has to return an int, otherwise we get
> build failures due to mismatched prototype and function definition.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  arch/avr32/cpu/interrupts.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/avr32/cpu/interrupts.c b/arch/avr32/cpu/interrupts.c
> index 6681e13..1127580 100644
> --- a/arch/avr32/cpu/interrupts.c
> +++ b/arch/avr32/cpu/interrupts.c
> @@ -107,7 +107,7 @@ static int set_interrupt_handler(unsigned int nr, void (*handler)(void),
>  	return 0;
>  }
>  
> -void timer_init(void)
> +int timer_init(void)
>  {
>  	extern void timer_interrupt_handler(void);
>  	u64 tmp;
> @@ -120,8 +120,10 @@ void timer_init(void)
>  	tb_factor = (u32)tmp;
>  
>  	if (set_interrupt_handler(0, &timer_interrupt_handler, 3))
> -		return;
> +		return 0;

NAK, this is an error and should return a negative value (though the
return value is currently not evaluated).

BTW there is another patch pending ->
http://patchwork.ozlabs.org/patch/117688/

best regards

Andreas Bie?mann

  reply	other threads:[~2011-10-13  7:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13  5:11 [U-Boot] [PATCH] avr32: fix timer_init() return type Mike Frysinger
2011-10-13  7:38 ` Andreas Bießmann [this message]
2011-10-13 10:27   ` Reinhard Meyer
2011-10-13 15:29     ` Mike Frysinger
2011-11-29  9:10     ` Andreas Bießmann

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=4E96955D.8080407@corscience.de \
    --to=biessmann@corscience.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.