Message ID | 1497951359-13334-2-git-send-email-benjamin.gaignard@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1274615qgd; Tue, 20 Jun 2017 02:37:22 -0700 (PDT) X-Received: by 10.98.72.198 with SMTP id q67mr28714867pfi.23.1497951441965; Tue, 20 Jun 2017 02:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497951441; cv=none; d=google.com; s=arc-20160816; b=o/pyEBjdzmY2CFA1LbfbQvLnBwtfCrlKq7DSB+MxcYb3WqYERxsMFpoG4pcPDQufkc 5g8+ogysPEzhUsNSFrVly8KVjzqgZTz5gOPJ1QH8C7glsvfSvQ01mrqGhrzrd9GmOYie TQffnXiacjM+rgwFjBNBX042/D0Jk96iHzrEnuPYpVh0t8hBjwkKCmDeuAqcKjAHXZ3I d0PhiwRf7dH1zlDvf2v7/2Il4unYX1f2KFQWaGOd5jx+GA1oSbqoPCoZcrbu/kOIoG7y bT+tzeZSHwk4SxCKnAoQ+c1q0pJSPd+fCnKz7nOGmS6/1vgDnuazRAGxY8z64dIMKnRM swtQ== 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=XXuG4PiAg+3rwFzypppHFdeZ1Ueb1qIMtTtY9tPAwel6Riq34jSx+Ms95yxq2vAyPj Dhe/0taJiDtbQwvja0loRA4THLbzteL2osmgVdF++yES9bwkmo+aAd9nK5T5beHP3BbS 0rpwqTv8WxLRpmBx5A3G4R2viZupWQ77A1Eukjbwmzj6kmc4db9QwoVb2OzzQus78RcT ZU8Et5TIDAs4+KRplgkkfmIaegeOTFD4aJlEp0rdL1WF2AIgfYbg4dA70CikoF/r3PiL twtbWI8DdZkt+B51YdNYZmpEXshRyqPHM820UHHFKlgCleYfYLrWaAAjKbM5hs5IS9IG JVRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=br2Z5HOI; 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e22si11613529plj.251.2017.06.20.02.37.21; Tue, 20 Jun 2017 02:37:21 -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=br2Z5HOI; 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 S1752646AbdFTJhG (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Tue, 20 Jun 2017 05:37:06 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37395 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbdFTJhA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 20 Jun 2017 05:37:00 -0400 Received: by mail-wm0-f43.google.com with SMTP id d73so14606956wma.0 for <linux-kernel@vger.kernel.org>; Tue, 20 Jun 2017 02:36:59 -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=br2Z5HOI35ATnFiedgVHD95YuXVd67gvbapiV2o9wSCauM44HBTRq4JudB4EZ69EBC UlZLaMQWLXczKt8yeU5SxhZICZAK0qtv7ULLEm4qsauFkBjE+P0XypE9fAtBg3EEn5X3 XW8M16THN24O0bD7xVkuqlmM5GrUfWK2EGxL8= 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=qaJ+iwgXg+bEx5PIYz2T747AnocV4adjS5LsSK5uLqOOmQ5vPrp9UVWLdAoV7bpqdi SC2G53vd+1PHYjHo9FoIcOIGXffP7LAjntfuiqRpK+d2PhEFNBTo47oUeE2AWMwZ6mkG h58QG/eXTX70FrKIeXDitJdZmC/0XHUC9OWrUpR52Jbmp277/iJHpCDaOVK7tBBXkP0r 5UqK+p+hbcb7E9vU5g0r/qkoIhPoVhZuo4Mcd2B7/Xb6J5eI/LCbaSk/S9n9vogqNHVH eEHH5FGkYbFmy6M6u5GNW3VP/DWsc1rVVK1p4iFpNaVqidQB45OIGe3GM7DAKISvHhv9 HdAA== X-Gm-Message-State: AKS2vOwqtji5KWMmT1oYiHZdDNVYJk2FgEdF4ylk2whRogi8xSv5cyuX 3eo5gNNRsor6aE/s X-Received: by 10.28.197.195 with SMTP id v186mr2086360wmf.13.1497951418891; Tue, 20 Jun 2017 02:36:58 -0700 (PDT) Received: from lmenx321.st.com. ([80.215.93.217]) by smtp.gmail.com with ESMTPSA id e24sm4482318wrc.35.2017.06.20.02.36.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:36:58 -0700 (PDT) From: Benjamin Gaignard <benjamin.gaignard@linaro.org> To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, x86@kernel.org, John Stultz <john.stultz@linaro.org>, linux-kernel@vger.kernel.org Subject: [PATCH 01/51] x86: rtc: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:09 +0200 Message-Id: <1497951359-13334-2-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
rtc: stop using rtc deprecated functions
|
expand
|
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; }
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 <benjamin.gaignard@linaro.org> CC: Thomas Gleixner <tglx@linutronix.de> CC: Ingo Molnar <mingo@redhat.com> CC: x86@kernel.org CC: John Stultz <john.stultz@linaro.org> CC: linux-kernel@vger.kernel.org --- arch/x86/kernel/rtc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1