From patchwork Tue Jun 20 09:35:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 105962 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1275860qgd; Tue, 20 Jun 2017 02:41:09 -0700 (PDT) X-Received: by 10.99.124.16 with SMTP id x16mr31091407pgc.280.1497951669264; Tue, 20 Jun 2017 02:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497951669; cv=none; d=google.com; s=arc-20160816; b=H+qx09aDZVUgvrm92+oxdlWSnMH+wTl37GHTdYHRIHZ8gUjXC+ap5PmT42ucX+mvNU GAiyYD0pQKaGY53wB4CW37//BvRdNJGl1no6r+wSWb4aF2v0FV1lZ7ZQfVaf/9AdEj8w eHNI0MuKhWGFX94Tv2Y+9FqwCV1WSNRQO1u7JwQ1gM5d+E/2fyLXK27Ddy1IOZtRhQLy rxNHdv4lSBUXKwvyzj8ePRAAF/1pF/JogOpssCxF6jX5cM8iqHDc3uaJeqVo1Atuuarr 0ferhOSPbPIHnlYWaQx+PkGfFAwOvtcpJIIUgP278uywNqnmAOypyVHhqe7ZkSHLAdbg gvsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=sO23rGWEA1ycy/BJDtsohTww8VKhk6/zELNRLNBVuBg=; b=N9C04hnlHZ8egviUSPbB4W6M2a9OpHvyXmQC4lRr45RBOlt2BZk4CFc50KyJeV1cZa 55xXnqBXB/mQ+uydJNPWzg3oweQPQailvv6WuDtqjRHcpTe9xF0UIxDfJa7iUNVReNBy 5Lcc80GoTtSA6mPxWD+H+wUOGsXIgpR5AtHAvcGMsyOAe51Bf5x7GCAS1LIROFIR5PGN HLh7FGCxKnRsFzMA/xvNypXWuImUCskaupWKOLIsXH0nCdZIEcZFBM+dUzCD1iOPzFcT y4ZpDKgMjFMAOG/Qb03B4NRo7pbz4ETysGg1r9ipghay9Mrr8nqQmtv5vP/nDO4lqV+x 699g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=WHPwA8q3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si759071pgn.367.2017.06.20.02.41.08; Tue, 20 Jun 2017 02:41:09 -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; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=WHPwA8q3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbdFTJlG (ORCPT + 25 others); Tue, 20 Jun 2017 05:41:06 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38143 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752077AbdFTJij (ORCPT ); Tue, 20 Jun 2017 05:38:39 -0400 Received: by mail-wm0-f42.google.com with SMTP id u195so14589555wmd.1 for ; Tue, 20 Jun 2017 02:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sO23rGWEA1ycy/BJDtsohTww8VKhk6/zELNRLNBVuBg=; b=WHPwA8q3u+uX2c6aSXx/g0Y3WvH7En8KgR34Qz5XokQys5Le5UbqRluFvaqfuFWJCP FjcTpATGSdBr9flHcaJ3MqCX6nzaX/ccfGkR6lQvtTudNyU6LWaJlV3hERsM4sI2HwG1 hYm94nqWuHsu5TX29ECWndLxdkmm6vSALCZ0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sO23rGWEA1ycy/BJDtsohTww8VKhk6/zELNRLNBVuBg=; b=tqrfxrx+b0Syqpi2TwlZWfyV2y1PJAAdrguJ2Z3cMLBr6WVHgxZHfl3uxTp+LEJV2V 7++aQ6KvXH5V1m+ocFfGQ4pfmZCmXmGA+6EpvO2wiFxHuX9s/e55GiifqvVNCbDQ5OxX hxOhCvsKBJmDHDq2L8TZ8Sdf5qrSeJ1ZNW1AtiSXRr6znyeSiyOkHF5a2d7gx0Fbe5bW y3KuK6stAVg9ML0PoGnmFZT/BZwjH9SVKdQ/Ir+LVhRLC25DUKGOEfoocCs+tFeCFx47 MZfYGzaOSyt7XrUmuD0EW1UFj03D322veSJUy44czlhUEu0+nkKyBeUTFls6QtVcw7uz iI6A== X-Gm-Message-State: AKS2vOx9M3hO/PJP0PxqhdGLrzwfGc2O4Rw9N2s3KWqFd45KgZlpakP4 3hfPM9GP1on5B27VhpHByA== X-Received: by 10.28.170.15 with SMTP id t15mr2099411wme.16.1497951518257; Tue, 20 Jun 2017 02:38:38 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.93.217]) by smtp.gmail.com with ESMTPSA id e24sm4482318wrc.35.2017.06.20.02.38.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:38:37 -0700 (PDT) From: Benjamin Gaignard To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH 48/51] rtc: vr41xx: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:56 +0200 Message-Id: <1497951359-13334-49-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497951359-13334-1-git-send-email-benjamin.gaignard@linaro.org> References: <1497951359-13334-1-git-send-email-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rtc_time_to_tm() and rtc_tm_to_time() are deprecated because they rely on 32bits variables and that will make rtc break in y2038/2016. Stop using those two functions to safer 64bits ones. Signed-off-by: Benjamin Gaignard CC: Alessandro Zummo CC: Alexandre Belloni CC: rtc-linux@googlegroups.com CC: linux-kernel@vger.kernel.org --- drivers/rtc/rtc-vr41xx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index e1b86bb..db51ed6 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -138,12 +138,12 @@ static void vr41xx_rtc_release(struct device *dev) static int vr41xx_rtc_read_time(struct device *dev, struct rtc_time *time) { - unsigned long epoch_sec, elapsed_sec; + unsigned long long epoch_sec, elapsed_sec; epoch_sec = mktime(epoch, 1, 1, 0, 0, 0); elapsed_sec = read_elapsed_second(); - rtc_time_to_tm(epoch_sec + elapsed_sec, time); + rtc_time64_to_tm(epoch_sec + elapsed_sec, time); return 0; } @@ -175,7 +175,7 @@ static int vr41xx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) spin_unlock_irq(&rtc_lock); - rtc_time_to_tm((high << 17) | (mid << 1) | (low >> 15), time); + rtc_time64_to_tm((high << 17) | (mid << 1) | (low >> 15), time); return 0; }