Skip to contentSkip to conversation

drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch removed from -mm tree

folded-merged [email protected] 1 participant 1 message Jun 6, 2014 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

Subject: [folded-merged] drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch removed from -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Fri, 06 Jun 2014 14:02:52 -0700

The patch titled
Subject: drivers/rtc/interface.c: fix for fix of alarm initialization
has been removed from the -mm tree. Its filename was
drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix.patch

This patch was dropped because it was folded into drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm.patch

------------------------------------------------------
From: Ales Novak <[email protected]>
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.

---

 drivers/rtc/interface.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/rtc/interface.c renamed from drivers/rtc/interface.c~drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix +1 -2
diff -puN drivers/rtc/interface.c~drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm-fix 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 [email protected] are

drivers-rtc-interfacec-fix-infinite-loop-in-initializing-the-alarm.patch drivers-rtc-rtc-bfinc-do-not-abort-when-requesting-irq-fails.patch