The patch titled rtc: fix handling of missing tm_year data when reading alarms has been added to the -mm tree. Its filename is rtc-fix-handling-of-missing-tm_year-data-when-reading-alarms.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 *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: rtc: fix handling of missing tm_year data when reading alarms From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> When fixing up invalid years rtc_read_alarm() was calling rtc_valid_tm() as a boolean but rtc_valid_tm() returns zero on success or a negative number if the time is not valid so the test was inverted. Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx> Cc: David Brownell <david-b@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/rtc/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/rtc/interface.c~rtc-fix-handling-of-missing-tm_year-data-when-reading-alarms drivers/rtc/interface.c --- a/drivers/rtc/interface.c~rtc-fix-handling-of-missing-tm_year-data-when-reading-alarms +++ a/drivers/rtc/interface.c @@ -271,7 +271,7 @@ int rtc_read_alarm(struct rtc_device *rt dev_dbg(&rtc->dev, "alarm rollover: %s\n", "year"); do { alarm->time.tm_year++; - } while (!rtc_valid_tm(&alarm->time)); + } while (rtc_valid_tm(&alarm->time) != 0); break; default: _ Patches currently in -mm which might be from broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx are linux-next.patch rtc-fix-handling-of-missing-tm_year-data-when-reading-alarms.patch rtc-rtc-wm8350-add-support-for-wm8350-rtc.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