From patchwork Wed Jul 12 08:04:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 107456 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp601710obm; Wed, 12 Jul 2017 01:06:19 -0700 (PDT) X-Received: by 10.98.70.206 with SMTP id o75mr52784758pfi.60.1499846779640; Wed, 12 Jul 2017 01:06:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499846779; cv=none; d=google.com; s=arc-20160816; b=kzHNKa3BSsX6JJfsVrGYLANURIvPMQhSxR0dyGkxkjea30/U8oIDvwYTEW7zOuTk30 oDXNVEf2YNdXhxMr9vmFjv9Hee9tBacBmhw98+YQFJ4nL8pBQCbaRVojN4WOLL//M7/H Sjoxe9Xi8Rh17BzquI9q07WdQ6qsXF10AVJ8DjL2LvEeRG8TCXS8ZaN6J29OpnXuSRUW SveGk5C5FTw8OxmAVbbSGVQ6ettIvy3qECoQLR0qI8TMHX4ZAkYHe4Sas7N8OJjd/mhS xE72fn8+Bcpwx6HiSsaTFzXoV0bPwbDrUK9DoIg11sz88OnpgDW0Lil5XoxZFmFhtJhr rywQ== 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=Ag/XSxvhcECxadOjjWRH1pG6I2aUy8KaYQ6uprANa68=; b=rr0bV5+tegjRKhLzrXo1Tg4YiM7iduslyNIMl4HY6bX9eSPrqw1tVcIu3byFU8J8zT eAOmHynUnDz5tBL2nd6Um5Asz7acX78Y0pexNTfntlkkAytwV90DJtUxYy5fld0st1wA z0MWir4jiUu9ZI/CMy7oJMQMdPF3IDeXoYT/z4X9Q2Ec5ZBZLRnH2vNCMYs3yteRcKvj Q0/UdVJi/jVnOdzLZ1vSQOwPxb3K2xmzbXGZU38Tw5WChXbUMy7kck8Dp++wNDqBaF9l sqb8e2b+86N5PEy6fZVwI2q0An4a2GIxJ6RwdtxlIGX+HBwBRs0mDC80wAccMH5BLl2u iLYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=jG7vPZpk; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 v10si1482343plk.122.2017.07.12.01.06.19; Wed, 12 Jul 2017 01:06:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=jG7vPZpk; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1756940AbdGLIGB (ORCPT + 14 others); Wed, 12 Jul 2017 04:06:01 -0400 Received: from mail-wr0-f182.google.com ([209.85.128.182]:34604 "EHLO mail-wr0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757081AbdGLIF6 (ORCPT ); Wed, 12 Jul 2017 04:05:58 -0400 Received: by mail-wr0-f182.google.com with SMTP id 77so22558624wrb.1 for ; Wed, 12 Jul 2017 01:05:52 -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=Ag/XSxvhcECxadOjjWRH1pG6I2aUy8KaYQ6uprANa68=; b=jG7vPZpkdldztR36gQWOR4LiPDeYvdHUGWJZ2tb4+aAnNDfAW3XOPluLruEPJl4Rf5 XKlMOhvdoa7JaNAI8bOjom4liaZJgDJtJn9u5bWn/7uEOBc/BI+LUUGE/VRRhYt9i03r CVflLjETqcyWCklJF3X0pw+aipu4oAysUNcz4= 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=Ag/XSxvhcECxadOjjWRH1pG6I2aUy8KaYQ6uprANa68=; b=FxrmcwbmA50HCetfJqCl7Ps/4Bb7adv0ctUvvhZOHsfo5ZHen3Iyw5qmst7udtFcsN 3r4eBng5yVnCG7NEKBuncskeksfj2VOo7K1HrbsXCC/i4E31RMgQnCifU2kfbTTNHS7b hZSbFpOmG0HytqKIW0d8qQeGMFJqH69Jjj8Ski58yYQm4v3nuoQrDDXI1GmvpRuNFKj3 f87gjagrUY3ocE2xFGQmH/R5NqdXi9WyoWfpVrApZhAdLIk4JjSKgHdCMNP2HJLg/Fue pv8QAjQhlpH+MyaPXBeIWji1et7p7KOcIQC28EMg8viuVoq7ShC02BfXD3xrd8xOvu7a x6aA== X-Gm-Message-State: AIVw110FbweP8CMZKvC4/E7O0FQ1/o4zCcBWucGLhhHzHgaR5BX2SdQE qKhvVhWRUnYCLmei X-Received: by 10.28.126.87 with SMTP id z84mr1542565wmc.65.1499846746764; Wed, 12 Jul 2017 01:05:46 -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.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 01:05:46 -0700 (PDT) From: Benjamin Gaignard To: benjamin.gaignard@linaro.org Cc: linaro-kernel@lists.linaro.org, "Rafael J. Wysocki" , Pavel Machek , Len Brown , Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 22/22] power: suspend test: stop using rtc deprecated functions Date: Wed, 12 Jul 2017 10:04:42 +0200 Message-Id: <1499846682-14093-23-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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 Acked-by: Pavel Machek CC: "Rafael J. Wysocki" CC: Pavel Machek CC: Len Brown CC: Alessandro Zummo CC: Alexandre Belloni 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 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);