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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.patch added to -mm tree
To: joeyli.kernel@xxxxxxxxx,a.zummo@xxxxxxxxxxxx,jlee@xxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
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" <joeyli.kernel@xxxxxxxxx>
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.

Signed-off-by: Lee, Chun-Yi <jlee@xxxxxxxx>
Cc: Alessandro Zummo <a.zummo@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/rtc/rtc-efi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/rtc/rtc-efi.c~drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days drivers/rtc/rtc-efi.c
--- a/drivers/rtc/rtc-efi.c~drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days
+++ a/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 joeyli.kernel@xxxxxxxxx are

drivers-rtc-rtc-efic-avoid-subtracting-day-twice-when-computing-year-days.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




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux