Message ID | 1497951359-13334-52-git-send-email-benjamin.gaignard@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1275182qgd; Tue, 20 Jun 2017 02:39:08 -0700 (PDT) X-Received: by 10.98.25.19 with SMTP id 19mr29772024pfz.116.1497951547906; Tue, 20 Jun 2017 02:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497951547; cv=none; d=google.com; s=arc-20160816; b=0nwr+mIsulvt1wk6OAqf7uM9FF+mxSzVVq5Z5iTriQq9jsAMiQpp1x4I5hgNcg1hMX oxKQFW/sNLA8eYuMpmIv5kYwgVrzmWwFoGAv2JGQCBWP2LppFaLa4uGnMH/WXBiIOBGu 49uOTv8jlzk7RTGneT2UX+wGWMBxQ81Ids6i8vuXFqMBdlGoYc2fkiYEEJl/n0Jt1A2o je8xtUQPs7wbkOsJ0tbMEE6pqcFs46LQDrDjWZ1H//dtXPsxe1EKW4GmqKk2E0pU2qxf rqbrW8s8VBtbfrwXVc8mw7g0+AjOXj9QTKQBHE1avwcQscrpd0Ep2quZx3FyrCNR1nzo z9nw== 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=8XXioQipp3igOlPonRcLWMszRPWDIIQ21sTTscbKVQA=; b=ZavPJ3YSaBj6+7bxufYprXsgpeLEKyWrx6+RWGMFXbauekbS2MAkNcKIMMUmLyxAJ+ L4jcM6GYKKgwocAwT0z8MfzKD6gDNSIkvWVUHSVEI1/2yVD2viq0+XKaHRdlS6NWI6vt 67eFLF0Awo3sDUk4ll/ia9L3BooXvJDMobmK2jUd5nEScWVEaqhQI5qGQxS4TXRYbQ7r l/vax7PC8PpkDCph2WuOhi/cnX/XXHCpGkKI4pJ4rhuV4vrMrdKerQHK1ZL9NXr2+6pp N0whBfu/ZL88t307U+dtzzKE3UHPCL8Jf6yyuh5RkKsUIBygqGdyqYjnvjYIRzWRLN3i AVJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=T7N6+9Sl; 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 i133si10453146pgc.544.2017.06.20.02.39.07; Tue, 20 Jun 2017 02:39:07 -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=T7N6+9Sl; 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 S1753192AbdFTJi5 (ORCPT <rfc822;georgi.djakov@linaro.org> + 25 others); Tue, 20 Jun 2017 05:38:57 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:34436 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753170AbdFTJiy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 20 Jun 2017 05:38:54 -0400 Received: by mail-wr0-f176.google.com with SMTP id 77so88387313wrb.1 for <linux-kernel@vger.kernel.org>; Tue, 20 Jun 2017 02:38:44 -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=8XXioQipp3igOlPonRcLWMszRPWDIIQ21sTTscbKVQA=; b=T7N6+9Sl19gDHz/33+XHIcAFTE+iJZdNsZCQwsZBg3p04S6q1LLdfSIrokfFSN3L8U cc+5IIi7bLZpo9jETl58Cpi11pwWTcUHHntxI+4eyY1HQuESUYGkZS98nAQFkqWXhWTu 5hfaOoIWAeorfq5JuycD1o9miIRf8RbCTsO20= 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=8XXioQipp3igOlPonRcLWMszRPWDIIQ21sTTscbKVQA=; b=k085dVpIWHDe0s8mEUaabQ1whYubPIGoQiHSqxb3u4TFE/lWVainnkW6q38BGOenDM ZNiWI18lOWUqoId6qx287mpXUdM6y8Y6LnjB25hx92k206igVUZCZRMW3aS/MHX1PE6k foncT7+N54ci5PVFoZ0nKbLhnUPPYSZkpYOWnuU++K4Z8nY2rF6IJ7lmjoBixEFEroHQ P5yu74yPRltXBfEdzUc/75wjgKivoogu0lJNZjFMes/navMSB6HwGkYbsECs+h734Cbb 5hIHZwUC2ZKq8N6zdEm36bl1SOzE2uEhhmM5LW0LwDaTsqghkRSyPkUoLmjynWW/Mm4J y/Zw== X-Gm-Message-State: AKS2vOxedkN1wJtuwfGPRrxQtCJxUwKQKSgPf8IKHFxY708PYWnS8v/A DaSPbfpIg9zxNGuk X-Received: by 10.223.161.219 with SMTP id v27mr3197605wrv.135.1497951523630; Tue, 20 Jun 2017 02:38:43 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:38:43 -0700 (PDT) From: Benjamin Gaignard <benjamin.gaignard@linaro.org> To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, rtc-linux@googlegroups.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 51/51] power: suspend test: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:59 +0200 Message-Id: <1497951359-13334-52-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/kernel/power/suspend_test.c b/kernel/power/suspend_test.c index 5db2170..334a893 100644 --- a/kernel/power/suspend_test.c +++ b/kernel/power/suspend_test.c @@ -71,7 +71,7 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state) static char info_test[] __initdata = KERN_INFO "PM: test RTC wakeup from '%s' suspend\n"; - unsigned long now; + unsigned long long now; struct rtc_wkalrm alm; int status; @@ -82,10 +82,10 @@ static void __init test_wakealarm(struct rtc_device *rtc, suspend_state_t state) printk(err_readtime, dev_name(&rtc->dev), status); return; } - rtc_tm_to_time(&alm.time, &now); + now = rtc_tm_to_time64(&alm.time); memset(&alm, 0, sizeof alm); - rtc_time_to_tm(now + TEST_SUSPEND_SECONDS, &alm.time); + rtc_time64_to_tm(now + TEST_SUSPEND_SECONDS, &alm.time); alm.enabled = true; status = rtc_set_alarm(rtc, &alm);
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: "Rafael J. Wysocki" <rjw@rjwysocki.net> CC: Pavel Machek <pavel@ucw.cz> CC: Len Brown <len.brown@intel.com> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Alexandre Belloni <alexandre.belloni@free-electrons.com> CC: rtc-linux@googlegroups.com CC: linux-pm@vger.kernel.org CC: linux-kernel@vger.kernel.org --- kernel/power/suspend_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1