All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benoit Boissinot <bboissin@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.16-rc5-mm2
Date: Fri, 3 Mar 2006 18:08:53 +0100	[thread overview]
Message-ID: <20060303170852.GA17018@ens-lyon.fr> (raw)
In-Reply-To: <20060303045651.1f3b55ec.akpm@osdl.org>

On 3/3/06, Andrew Morton <akpm@osdl.org> wrote:
>
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.16-rc5/2.6.16-rc5-mm2/
>
>
> - Should be a bit better than 2.6.16-rc5-mm1, but I still had to fix a ton
>   of things to get this to compile and boot.  We're not being careful enough.
>
> - The procfs rework is getting there, but some problems probably still remain.
>
> - There will be a number of new warnings at boot time when initcalls fail.
>   Generally that's OK: it usually indicates that you linked something into
>   vmlinux which you're not actually using.  But sometimes it can indicate
>   kernel bugs.
>
> - The (much-shrunk) audit git tree is back.
>

I have the following warning:

drivers/rtc/interface.c: In function 'rtc_set_mmss':
drivers/rtc/interface.c:91: warning: 'old.tm_hour' is used uninitialized in this function
drivers/rtc/interface.c:91: warning: 'old.tm_min' is used uninitialized in this function

The following patch fixes it (maybe using goto would be better and avoid
having lines > 80 chars).

Signed-off-by: Benoit Boissinot <benoit.boissinot@ens-lyon.fr>

Index: linux/drivers/rtc/interface.c
===================================================================
--- linux.orig/drivers/rtc/interface.c
+++ linux/drivers/rtc/interface.c
@@ -76,21 +76,25 @@ int rtc_set_mmss(struct class_device *cl
 		if (rtc->ops->read_time && rtc->ops->set_time) {
 		        struct rtc_time new, old;
 
-		        new.tm_sec  = secs % 60;
-		        secs /= 60;
-		        new.tm_min  = secs % 60;
-		        secs /= 60;
-		        new.tm_hour = secs % 24;
-
-		       /*
-		        * avoid writing when we're going to change the day
-		        * of the month.  We will retry in the next minute.
-		        * This basically means that if the RTC must not drift
-		        * by more than 1 minute in 11 minutes.
-		        */
-			if (!((old.tm_hour == 23 && old.tm_min == 59) ||
-		            (new.tm_hour == 23 && new.tm_min == 59)))
-				err = rtc->ops->set_time(class_dev->dev, &new);
+			err = rtc->ops->read_time(class_dev->dev, &old);
+			if (!err) {
+
+				new.tm_sec  = secs % 60;
+				secs /= 60;
+				new.tm_min  = secs % 60;
+				secs /= 60;
+				new.tm_hour = secs % 24;
+
+			       /*
+				* avoid writing when we're going to change the day
+				* of the month.  We will retry in the next minute.
+				* This basically means that if the RTC must not drift
+				* by more than 1 minute in 11 minutes.
+				*/
+				if (!((old.tm_hour == 23 && old.tm_min == 59) ||
+				    (new.tm_hour == 23 && new.tm_min == 59)))
+					err = rtc->ops->set_time(class_dev->dev, &new);
+			}
 		}
 		else
 			err = -EINVAL;

  parent reply	other threads:[~2006-03-03 17:09 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-03 12:56 2.6.16-rc5-mm2 Andrew Morton
2006-03-03 15:26 ` 2.6.16-rc5-mm2: IPW_QOS: two remarks Adrian Bunk
2006-03-05  0:46   ` Andreas Happe
2006-03-07 17:06     ` Adrian Bunk
2006-03-17 19:14     ` John W. Linville
2006-03-18 17:47       ` [PATCH 2.6.16-rc6 1/1] ipw2200: Add Kconfig entries for QOS and Monitor mode Andreas Happe
2006-03-22  3:11         ` Zhu Yi
2006-03-03 16:08 ` 2.6.16-rc5-mm2 (mips compile fix) Jason Baron
2006-03-03 17:08 ` Benoit Boissinot [this message]
2006-03-04  1:34 ` 2.6.16-rc5-mm2 Grant Coady
2006-03-05  6:26   ` 2.6.16-rc5-mm2 Andrew Morton
2006-03-05  7:24     ` 2.6.16-rc5-mm2 Mike Galbraith
2006-03-06 11:35     ` 2.6.16-rc5-mm2 Takashi Iwai
2006-03-05 12:34   ` 2.6.16-rc5-mm2 Antonino A. Daplas
2006-03-04 12:14 ` [-mm patch] drivers/acpi/bus.c: make struct acpi_sci_dir static Adrian Bunk
2006-03-04 12:14 ` [RFC: -mm patch] drivers/media/video/msp3400-kthreads.c: make 3 functions static Adrian Bunk
2006-03-04 12:14 ` [RFC: -mm patch] drivers/message/fusion/mptbase.c: make mpt_read_ioc_pg_3() static Adrian Bunk
2006-03-04 12:14 ` [-mm patch] kernel/futex.c: make futexfs_get_sb() static again Adrian Bunk
2006-03-06 14:44   ` David Howells
2006-03-04 12:14 ` [-mm patch] mm/bootmem.c: make bdata_list static Adrian Bunk
2006-03-04 12:14 ` [-mm patch] NFS: make 2 functions static Adrian Bunk
2006-03-04 12:14 ` [RFC: -mm patch] fs/locks.c: make posix_locks_deadlock() static Adrian Bunk
2006-03-04 17:29 ` 2.6.16-rc5-mm2 Mattia Dongili
2006-03-05  6:28   ` 2.6.16-rc5-mm2 Andrew Morton
2006-03-05  8:14 ` 2.6.16-rc5-mm2 Benoit Boissinot
2006-03-05  8:34   ` 2.6.16-rc5-mm2 Andrew Morton
2006-03-05 11:42     ` 2.6.16-rc5-mm2 Stefan Rompf
2006-03-06 15:22       ` 2.6.16-rc5-mm2 James Ketrenos
2006-03-05 22:54 ` 2.6.16-rc5-mm2 Dominik Karall
2006-03-07  5:43   ` 2.6.16-rc5-mm2 Andrew Morton
2006-03-07 10:43     ` 2.6.16-rc5-mm2 David Howells
2006-03-07 14:33     ` 2.6.16-rc5-mm2 Dominik Karall
2006-03-07 17:25       ` 2.6.16-rc5-mm2 john stultz
2006-03-08  1:13         ` 2.6.16-rc5-mm2 Andi Kleen
2006-03-06  8:45 ` 2.6.16-rc5-mm2 Cornelia Huck
2006-03-06  9:10 ` 2.6.16-rc5-mm2 compile error in urb.c Helge Hafting
2006-03-06  9:21   ` Andrew Morton
2006-03-06 12:17     ` Helge Hafting
  -- strict thread matches above, loose matches on Subject: below --
2006-03-05 18:16 2.6.16-rc5-mm2 Matt Reuther

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=20060303170852.GA17018@ens-lyon.fr \
    --to=bboissin@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.