From patchwork Wed Jul 12 08:04:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 107449 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp600935obm; Wed, 12 Jul 2017 01:05:25 -0700 (PDT) X-Received: by 10.99.186.83 with SMTP id l19mr2543362pgu.44.1499846725306; Wed, 12 Jul 2017 01:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499846725; cv=none; d=google.com; s=arc-20160816; b=rko4M+P8eCv4YzUrDE1p2ozLYQHki6ckyybyk7kkMo1DZpWILbIB7epQojAhQI5m0T R1yOy83/LAgUwzpbIUvgm9WVUnhMfCN3pLg5R0sFowwt3xOLRz2wAiQF/xe9BAAXEFCF IfodY6Q2U45n4X3Pg94VRqbu3WVelyoYNtFUoZJiV6UQVdPFYD5HNosKYY7Uq4Iq+1eR r4jiKARLXdXkK738tYx2FXKzfoc3AuARPhOjYPrLg/Zz96a5Eoqq5bILzJNhUZDJ4Jra bOe5LoFedhRhz8z54mT7cb6XXCBW2MLXcQvwkfGi4olKFXjUpzIb6+m6vwVlnMdBsn5V BXUA== 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=U/MzYqHesZ1TkC0bX8Tb71+LAVdTDZ2lH5taY7EtT3s=; b=YQxiolFmeBkS4jkscP7ZMovL1R5vMzfE2mkgF+nqoclO7P3L49oZPRf+A0DHZMZHuW e1GrPL9DuGSnRGPlFr7Z2od6/QLUFIhXUlMwdmA1UNJj8ri3cfnqlzYQPQ3eqq2XbU1O ONxt0WeSk++lRJhjGAMeuerjkl0pUP90FMsHhOmYhWr2V2Gz7cermk2b6+LUHZIfgyy0 FHeJZ4N4bS2igeeMNgnPG1o/Nc4RsdwGEfvx+HjWQ0cWw00/v58l/FICJRwTFlvofgLr mCmAIKcJdO3YoymsPjx7BZV0CbNB1gfdJhztP0uag9bVjmVrh42pQB6zGZOXkV9G0rjJ Dw6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=PhSy+kr3; 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 l29si1456364pli.30.2017.07.12.01.05.24; Wed, 12 Jul 2017 01:05:25 -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=PhSy+kr3; 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 S1756994AbdGLIFQ (ORCPT + 25 others); Wed, 12 Jul 2017 04:05:16 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:34072 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756889AbdGLIFK (ORCPT ); Wed, 12 Jul 2017 04:05:10 -0400 Received: by mail-wr0-f175.google.com with SMTP id 77so22535057wrb.1 for ; Wed, 12 Jul 2017 01:05:10 -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=U/MzYqHesZ1TkC0bX8Tb71+LAVdTDZ2lH5taY7EtT3s=; b=PhSy+kr3c7Kk2odeVrCoBkZogCcdBmCkz1donw2I6L9SmF3yjR5/KcwXkyAxU0PHMA dtsFELb9Cnydd5/RiOdQahfkzPN0vGtQiHHdGCRitbiYqcbLkT2yckN6KVycH8jS+17y H7OTb3WCvAREZA3wx/Q4zvimvD+mRGYO+jh1o= 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=U/MzYqHesZ1TkC0bX8Tb71+LAVdTDZ2lH5taY7EtT3s=; b=cYzgi0a6Cy9wxt+6OqVjyi4ESPp1DZnzCE3/87gpumMf7a/z7tl40db6pUP774WmVK Jd+G/gn/VFAgbFHIClWod8MuSF/nu2+81JkvLzgM5zj2SWUcWsoD+j+pDbY9FPitKkMP AN4Vsi+EGw6Yti9cldbl0hMgsDIurTNu4htqmwZ9131YDtag+UTMj+iByAwKe5rPhvTF QFa5axPFzzvXvWfTHIIk7bjQEOIRi3fvKEd/h7LdWjoqf0P1ZcCJONdAwfwHVjJ2Xc/l JwtJ90AWM+ST7MRJzMptNHEFxn4gNKVlE5B38MEmV+/uslkRtfqCz46MtVJk/ftp23NX fUuA== X-Gm-Message-State: AIVw113yOfjewZcxgStJgCPn7w6GTG/MXfUyK2qVJeWJoOC4nz3Zf3u9 MFeR60wdrZKWjPT2 X-Received: by 10.28.222.214 with SMTP id v205mr1564575wmg.68.1499846709395; Wed, 12 Jul 2017 01:05:09 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.158.26]) by smtp.gmail.com with ESMTPSA id p34sm1430744wrc.66.2017.07.12.01.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 01:05:08 -0700 (PDT) From: Benjamin Gaignard To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, Thomas Gleixner , Ingo Molnar , x86@kernel.org, John Stultz , linux-kernel@vger.kernel.org Subject: [PATCH v2 01/22] x86: rtc: stop using rtc deprecated functions Date: Wed, 12 Jul 2017 10:04:21 +0200 Message-Id: <1499846682-14093-2-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1499846682-14093-1-git-send-email-benjamin.gaignard@linaro.org> References: <1499846682-14093-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: Thomas Gleixner CC: Ingo Molnar CC: x86@kernel.org CC: John Stultz CC: linux-kernel@vger.kernel.org --- arch/x86/kernel/rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index 5b21cb7..76b817c 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c @@ -40,11 +40,11 @@ */ int mach_set_rtc_mmss(const struct timespec *now) { - unsigned long nowtime = now->tv_sec; + unsigned long long nowtime = now->tv_sec; struct rtc_time tm; int retval = 0; - rtc_time_to_tm(nowtime, &tm); + rtc_time64_to_tm(nowtime, &tm); if (!rtc_valid_tm(&tm)) { retval = mc146818_set_time(&tm); if (retval) @@ -52,7 +52,7 @@ int mach_set_rtc_mmss(const struct timespec *now) __func__, retval); } else { printk(KERN_ERR - "%s: Invalid RTC value: write of %lx to RTC failed\n", + "%s: Invalid RTC value: write of %llx to RTC failed\n", __func__, nowtime); retval = -EINVAL; }