Subject: + drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch added to -mm tree To: alnovak@xxxxxxx,a.zummo@xxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 08 May 2014 15:12:38 -0700 The patch titled Subject: drivers/rtc/interface.c: fix for fix of alarm initialization has been added to the -mm tree. Its filename is drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Ales Novak <alnovak@xxxxxxx> Subject: drivers/rtc/interface.c: fix for fix of alarm initialization Seems the previous patch "fix infinite loop in initializing the alarm" did break the infinite loop in alarm initialization, but not in the right way. The loop indeed should walk through the not-leap years and stop on the leap one. This patch does apply on top of the previous one. Signed-off-by: Ales Novak <alnovak@xxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/rtc/interface.c~drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix drivers/rtc/interface.c --- a/drivers/rtc/interface.c~drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix +++ a/drivers/rtc/interface.c @@ -292,8 +292,7 @@ int __rtc_read_alarm(struct rtc_device * dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year"); do { alarm->time.tm_year++; - } while (alarm->time.tm_mon == 1 - && is_leap_year(alarm->time.tm_year + 1900) + } while (!is_leap_year(alarm->time.tm_year + 1900) && rtc_valid_tm(&alarm->time) != 0); break; _ Patches currently in -mm which might be from alnovak@xxxxxxx are drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm.patch drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html