All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	kernel list <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] Fix hpet wrong values
Date: Tue, 27 Nov 2007 18:53:22 -0800	[thread overview]
Message-ID: <20071127185322.77c76bac.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071127122308.GA2640@elf.ucw.cz>

On Tue, 27 Nov 2007 13:23:08 +0100 Pavel Machek <pavel@ucw.cz> wrote:

> If hpet is not enabled in config, its init should not pretend to work,
> and people should not try to get time from it. 
> 
> Signed-off-by: Pavel Machek <pavel@suse.cz>
> 
> diff --git a/include/asm-x86/hpet.h b/include/asm-x86/hpet.h
> index b1f3c1e..1777d68 100644
> --- a/include/asm-x86/hpet.h
> +++ b/include/asm-x86/hpet.h
> @@ -81,8 +81,8 @@ #endif /* CONFIG_HPET_EMULATE_RTC */
>  
>  #else
>  
> -static inline int hpet_enable(void) { return 0; }
> -static inline unsigned long hpet_readl(unsigned long a) { return 0; }
> +static inline int hpet_enable(void) { return -ENODEV; }
> +static inline unsigned long hpet_readl(unsigned long a) { BUG(); }
>  
>  #endif /* CONFIG_HPET_TIMER */
>  #endif /* ASM_X86_HPET_H */
> 

Dare I point out Documentation/SubmitChecklist?



include/asm/hpet.h: In function 'hpet_readl':
include/asm/hpet.h:86: warning: no return statement in function returning non-void

just delete it and rely on -Werror-implicit-function-declaration

--- a/include/asm-x86/hpet.h~fix-hpet-wrong-values-fix
+++ a/include/asm-x86/hpet.h
@@ -82,7 +82,6 @@ extern irqreturn_t hpet_rtc_interrupt(in
 #else
 
 static inline int hpet_enable(void) { return -ENODEV; }
-static inline unsigned long hpet_readl(unsigned long a) { BUG(); }
 
 #endif /* CONFIG_HPET_TIMER */
 #endif /* ASM_X86_HPET_H */
_




  reply	other threads:[~2007-11-28  2:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 12:23 [patch] Fix hpet wrong values Pavel Machek
2007-11-28  2:53 ` Andrew Morton [this message]
2007-11-28 10:38 ` Ingo Molnar
2007-11-28 10:40   ` Ingo Molnar
2007-11-28 21:45     ` Pavel Machek

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=20071127185322.77c76bac.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.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.