Skip to contentSkip to conversation

+ drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Apr 21, 2014 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

Subject: + drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 21 Apr 2014 13:11:07 -0700

The patch titled
Subject: drivers/rtc/rtc-efi.c: avoid subtracting day twice when computing year days
has been added to the -mm tree. Its filename is
drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.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: "Lee, Chun-Yi" <[email protected]>
Subject: drivers/rtc/rtc-efi.c: avoid subtracting day twice when computing year days

Compared source code of rtc-lib.c::rtc_year_days() with efirtc.c::rtc_year_days(), found the code in rtc-efi decreases value of day twice when it computing year days. rtc-lib.c::rtc_year_days() has already decrease days and return the year days from 0 to 365.

---

 drivers/rtc/rtc-efi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-efi.c renamed from drivers/rtc/rtc-efi.c~drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days +1 -1
diff -puN drivers/rtc/rtc-efi.c~drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days drivers/rtc/rtc-efi.c
@@ -35,7 +35,7 @@ static inline int
 compute_yday(efi_time_t *eft)
 {
 	/* efi_time_t.month is in the [1-12] so, we need -1 */
-	return rtc_year_days(eft->day - 1, eft->month - 1, eft->year);
+	return rtc_year_days(eft->day, eft->month - 1, eft->year);
 }
 /*
  * returns day of the week [0-6] 0=Sunday

_

Patches currently in -mm which might be from [email protected] are

drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.patch