All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] efirtc: replace 1998 with EFI_RTC_EPOCH
@ 2015-11-02 14:49 Geliang Tang
  2015-11-02 14:49 ` [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init Geliang Tang
  0 siblings, 1 reply; 5+ messages in thread
From: Geliang Tang @ 2015-11-02 14:49 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman; +Cc: Geliang Tang, linux-kernel

EFI_RTC_EPOCH macre has been defined. So I replace 1998 with it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/char/efirtc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/char/efirtc.c b/drivers/char/efirtc.c
index dc62568..5323d8c 100644
--- a/drivers/char/efirtc.c
+++ b/drivers/char/efirtc.c
@@ -82,8 +82,9 @@ compute_wday(efi_time_t *eft)
 	int y;
 	int ndays = 0;
 
-	if ( eft->year < 1998 ) {
-		printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n");
+	if ( eft->year < EFI_RTC_EPOCH ) {
+		printk(KERN_ERR "efirtc: EFI year < %d, invalid date\n",
+				EFI_RTC_EPOCH);
 		return -1;
 	}
 
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-04 14:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02 14:49 [PATCH 1/2] efirtc: replace 1998 with EFI_RTC_EPOCH Geliang Tang
2015-11-02 14:49 ` [PATCH 2/2] efirtc: add efi_enabled check in efi_rtc_init Geliang Tang
2015-11-02 15:37   ` Arnd Bergmann
2015-11-04 14:45     ` Geliang Tang
2015-11-04 14:51       ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.