public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Subject: [RFC] show set_rtc_mmss: message only once
Date: Fri, 19 Nov 2010 12:26:48 -0800	[thread overview]
Message-ID: <20101119122648.4274c994@nehalam> (raw)

Occasionally system get in state where CMOS clock has gotten
slightly ahead of current time and the periodic update of RTC
fails. The message is a nuisance and repeats spamming the log.

  See: http://www.ntp.org/ntpfaq/NTP-s-trbl-spec.htm#Q-LINUX-SET-RTC-MMSS

Rather than just removing the message, make it show only once
and reduce severity since it indicates a normal and non urgent
condition.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 arch/alpha/kernel/time.c              |    2 +-
 arch/cris/kernel/time.c               |    2 +-
 arch/mips/dec/time.c                  |    2 +-
 arch/mips/include/asm/mc146818-time.h |    2 +-
 arch/mn10300/kernel/rtc.c             |    2 +-
 arch/sh/boards/mach-sh03/rtc.c        |    2 +-
 arch/x86/kernel/rtc.c                 |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

--- a/arch/alpha/kernel/time.c	2010-11-19 12:14:47.003071149 -0800
+++ b/arch/alpha/kernel/time.c	2010-11-19 12:15:13.058296694 -0800
@@ -506,7 +506,7 @@ set_rtc_mmss(unsigned long nowtime)
 		CMOS_WRITE(real_seconds,RTC_SECONDS);
 		CMOS_WRITE(real_minutes,RTC_MINUTES);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
  		retval = -1;
--- a/arch/cris/kernel/time.c	2010-11-19 12:14:47.015069088 -0800
+++ b/arch/cris/kernel/time.c	2010-11-19 12:15:22.168594662 -0800
@@ -86,7 +86,7 @@ int set_rtc_mmss(unsigned long nowtime)
 		CMOS_WRITE(real_seconds,RTC_SECONDS);
 		CMOS_WRITE(real_minutes,RTC_MINUTES);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
 		retval = -1;
--- a/arch/mips/dec/time.c	2010-11-19 12:14:47.031066339 -0800
+++ b/arch/mips/dec/time.c	2010-11-19 12:15:40.229230614 -0800
@@ -104,7 +104,7 @@ int rtc_mips_set_mmss(unsigned long nowt
 		CMOS_WRITE(real_seconds, RTC_SECONDS);
 		CMOS_WRITE(real_minutes, RTC_MINUTES);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
 		retval = -1;
--- a/arch/mips/include/asm/mc146818-time.h	2010-11-19 12:14:47.047063590 -0800
+++ b/arch/mips/include/asm/mc146818-time.h	2010-11-19 12:15:47.247926878 -0800
@@ -66,7 +66,7 @@ static inline int mc146818_set_rtc_mmss(
 		CMOS_WRITE(real_seconds, RTC_SECONDS);
 		CMOS_WRITE(real_minutes, RTC_MINUTES);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
 		retval = -1;
--- a/arch/mn10300/kernel/rtc.c	2010-11-19 12:14:47.063060842 -0800
+++ b/arch/mn10300/kernel/rtc.c	2010-11-19 12:16:02.309135936 -0800
@@ -89,7 +89,7 @@ static int set_rtc_mmss(unsigned long no
 		CMOS_WRITE(real_seconds, RTC_SECONDS);
 		CMOS_WRITE(real_minutes, RTC_MINUTES);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
 		retval = -1;
--- a/arch/sh/boards/mach-sh03/rtc.c	2010-11-19 12:14:47.079058094 -0800
+++ b/arch/sh/boards/mach-sh03/rtc.c	2010-11-19 12:16:14.478887406 -0800
@@ -108,7 +108,7 @@ static int set_rtc_mmss(unsigned long no
 		__raw_writeb(real_minutes % 10, RTC_MIN1);
 		__raw_writeb(real_minutes / 10, RTC_MIN10);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
 		retval = -1;
--- a/arch/x86/kernel/rtc.c	2010-11-19 12:14:47.091056032 -0800
+++ b/arch/x86/kernel/rtc.c	2010-11-19 12:16:26.092747020 -0800
@@ -76,7 +76,7 @@ int mach_set_rtc_mmss(unsigned long nowt
 		CMOS_WRITE(real_seconds, RTC_SECONDS);
 		CMOS_WRITE(real_minutes, RTC_MINUTES);
 	} else {
-		printk(KERN_WARNING
+		printk_once(KERN_NOTICE
 		       "set_rtc_mmss: can't update from %d to %d\n",
 		       cmos_minutes, real_minutes);
 		retval = -1;

                 reply	other threads:[~2010-11-19 20:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20101119122648.4274c994@nehalam \
    --to=shemminger@vyatta.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox