From patchwork Fri May 15 09:31:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xunlei Pang X-Patchwork-Id: 48556 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C8DF121411 for ; Fri, 15 May 2015 10:05:37 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf29199673lab.1 for ; Fri, 15 May 2015 03:05:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=s6YZJoOUzm0P+Uc7PRnfebtqs3XjxnuEBpHF5jW5R3A=; b=YOGvBh/FBt2Bnlbe9JWGrUSPOWpTnpjNqvIM07CS17YbFhPpm59xzgAbwlWOxgGgIQ lGBeZMZG1tzkdtcZRyEuupdrDYr36FuVofID7MoO3Gy9UBUm5m+UMG0MGfv182EXc0o4 uYooKvymuNQMRRjQb5WT18yyy5t0p8/rYH3jbwYjszq/Nji6+h4jidTt9cNmZrjaOOmh khocn04j2unct0d5fkI9sVQDs7yGb3Zp0jJb4X2LK1wi9tLjNRXCk/JMBbMQdr+L7SL7 GrlNsjhwlpj3V5gWWJSKVUFqNzmbPRwQXqFDeqgrbsD7/Y1NPNxGcHmxGS00i/sQvvRz PXJg== X-Gm-Message-State: ALoCoQlioNVKmRRvxmnEjZKVQjsOKaFVzDrd6imXoeCmX/0Wyvn8TShU1EFM4kw7+GTpvKfrPhpz X-Received: by 10.194.240.164 with SMTP id wb4mr6484087wjc.1.1431684336700; Fri, 15 May 2015 03:05:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.36 with SMTP id g4ls529676lah.33.gmail; Fri, 15 May 2015 03:05:36 -0700 (PDT) X-Received: by 10.152.27.162 with SMTP id u2mr6451619lag.22.1431684336431; Fri, 15 May 2015 03:05:36 -0700 (PDT) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com. [2a00:1450:4010:c03::229]) by mx.google.com with ESMTPS id d4si765501lbb.6.2015.05.15.03.05.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 May 2015 03:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::229 as permitted sender) client-ip=2a00:1450:4010:c03::229; Received: by labbd9 with SMTP id bd9so111948303lab.2 for ; Fri, 15 May 2015 03:05:36 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr6430066lak.117.1431684336259; Fri, 15 May 2015 03:05:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1900235lbb; Fri, 15 May 2015 03:05:35 -0700 (PDT) X-Received: by 10.66.243.69 with SMTP id ww5mr17016051pac.106.1431684334581; Fri, 15 May 2015 03:05:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca5si1854265pac.147.2015.05.15.03.05.04; Fri, 15 May 2015 03:05:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933922AbbEOKE7 (ORCPT + 28 others); Fri, 15 May 2015 06:04:59 -0400 Received: from m50-111.126.com ([123.125.50.111]:49400 "EHLO m50-111.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753594AbbEOKE5 (ORCPT ); Fri, 15 May 2015 06:04:57 -0400 X-Greylist: delayed 1906 seconds by postgrey-1.27 at vger.kernel.org; Fri, 15 May 2015 06:04:56 EDT Received: from localhost.localdomain (unknown [210.21.223.3]) by smtp5 (Coremail) with SMTP id jtKowAAXZ1_7vFVVPiEDAA--.523S2; Fri, 15 May 2015 17:31:46 +0800 (CST) From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: rtc-linux@googlegroups.com, Alessandro Zummo , John Stultz , Arnd Bergmann , "David S. Miller" , sparclinux@vger.kernel.org, Xunlei Pang Subject: [PATCH 1/2] drivers/rtc/interface.c: Change rtc_set_mmss() to use time64_t Date: Fri, 15 May 2015 17:31:31 +0800 Message-Id: <1431682292-29732-1-git-send-email-xlpang@126.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: jtKowAAXZ1_7vFVVPiEDAA--.523S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7uF1UWrWDGrW7uFy3AFW3trb_yoW8WF1rpF 43ua45GrWUtrZFgrZ7W3ZrC3y5Kw4jq34xGFyfCw1Y9FWxtFyrJa4rArW7AF1jk3yrGFW7 XFyIk398uw1UG3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jzQ6LUUUUU= X-Originating-IP: [210.21.223.3] X-CM-SenderInfo: p0ost0bj6rjloofrz/1tbi6AL6v1UJQAPsmQAAsF Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: xlpang@126.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::229 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@; dmarc=fail (p=NONE dis=NONE) header.from=126.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Xunlei Pang rtc_set_mmss() uses "unsigned long" as its second parameter which may have y2038 problem on 32-bit systems. Change it to use time64_t. All its call sites will be changed later(there are no problems leaving these call sites untouched). Signed-off-by: Xunlei Pang --- drivers/rtc/interface.c | 2 +- include/linux/rtc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index d43ee40..480ee3c 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -90,7 +90,7 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) } EXPORT_SYMBOL_GPL(rtc_set_time); -int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs) +int rtc_set_mmss(struct rtc_device *rtc, time64_t secs) { int err; diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 8dcf682..9c3180e 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -161,7 +161,7 @@ extern void devm_rtc_device_unregister(struct device *dev, extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); -extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); +extern int rtc_set_mmss(struct rtc_device *rtc, time64_t secs); extern int rtc_set_ntp_time(struct timespec64 now); int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); extern int rtc_read_alarm(struct rtc_device *rtc,