From patchwork Tue Jun 20 09:35:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 105980 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1279100qgd; Tue, 20 Jun 2017 02:51:34 -0700 (PDT) X-Received: by 10.84.136.129 with SMTP id 1mr34351146pll.213.1497952294339; Tue, 20 Jun 2017 02:51:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497952294; cv=none; d=google.com; s=arc-20160816; b=OMWvcus3UC4G/53XB5LGThngkuG+Dq99FGNfmBVYVtyVAUjTPGTh5refV0WuRRdSwi yG2hI3EnMtv0NQ2ycxpMDpzwI+PJM/lmbzow/LvXeX5VS4x3E8k9eOyvcHkOPvfEHYzr WmehU1O8/QM4zp91Ji6RqOeggrYn8QShmC01U0duLXR0C2dqbGYGPlhGoRCUq8eoHb7f XyLfxS8/GbYzDJE1x2oYy+UzYmYctOiSGXnZJskisbxwmwEVro4kCacMuk97SGqhXTr9 Nh6abiC/JAxTY1l6daxmn5wNU360fJtJhcn5Ds+Ew/LW+rDPtE2bA4ZSZIMOZUYLJq09 Plxw== 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=CFmWpgg6G+obBIOMIMFHB6fN8CsAS6nD5xQQgKbS17U=; b=w5u8dTe3qSKIxzrbHfmuSt7qosJKS9H7Ani/vPg0aMcJDIk0pSQwdLShrNrJLfflfr PO5mSfK2XMZcMMZ/DS6YR39LNBn8TAAn39YFtY7pxzuyQe31AuYCK/cpvJ08uJVO6rj0 +gyu+BPTag4MvyikCOhdn2dZcr0h6rvCfstdhqte8OUsnQHPCrAlhyAjCCj1kA/e7odQ Uftq8ENv6nUWVy5ZpAoscCy4LHGN+FCznzfwQPTpgbM/GytL6fxxGx+amLJs1UdL1LgB nU+L9DE83ftjvKCkqx7rf1rfS/dhvdzHIQIOgWDLRsgWf6ysZO/9m+0qj3d8e2KH4+a2 n+9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=ciYUGsQj; 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 f1si10592015plb.394.2017.06.20.02.51.34; Tue, 20 Jun 2017 02:51:34 -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=ciYUGsQj; 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 S1752458AbdFTJvT (ORCPT + 25 others); Tue, 20 Jun 2017 05:51:19 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:35216 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752863AbdFTJh7 (ORCPT ); Tue, 20 Jun 2017 05:37:59 -0400 Received: by mail-wm0-f47.google.com with SMTP id x70so16026431wme.0 for ; Tue, 20 Jun 2017 02:37:54 -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=CFmWpgg6G+obBIOMIMFHB6fN8CsAS6nD5xQQgKbS17U=; b=ciYUGsQj5i1Tya7/bex3utqcbSzF6Dkd1joT5R0gtVysWFmv62YxQTBGysm53/hKEw 221DvjkfWWC6GTAMrsKmMxR/3VimjGmEGJ8yC0ZUdMwcx/coZpMzN+UbHDrLvo8LG6YB 6TXhFW9rj2grdK4bsm+W1cl1JcDT8mLcSsqcQ= 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=CFmWpgg6G+obBIOMIMFHB6fN8CsAS6nD5xQQgKbS17U=; b=cUWzan5mfV0CDvlfpxg2oSpWcEZekG/Am1fxCtuWEx2GTp16bN+kxWjcmClNpfYKC4 zwdoxMXoPb1XFHB66pLP8n7sKUgXX24r1esI9+fpOG1P2p29ilyVktnOaIkw2lpOsgX8 l5fifHnFgtjXRIlWjFyhjlFpRQ5iQoiK9r7n/UaEvyryMWc8jp5mMu8MzR5LtNKR29V5 qiwvDNW4GoLlGnYmgK/4Vprqkfs6PSj3o4DOWT8sP13lba7F44313o+w2E/iOwG5jcy0 31ziZMB+j1yev0WG9fOFGFX0rZ1F/1+Mm8DVsHGVD/ox0PyYQ9ymFfHXAjLUQMfKZsjr 6u5A== X-Gm-Message-State: AKS2vOzaFRlqXnelNIrzyYLia+mlbzrm1TKci15L9FomvNe/EcjtAQzB AN6pCDr+EB00nYfp X-Received: by 10.28.32.5 with SMTP id g5mr558005wmg.70.1497951463522; Tue, 20 Jun 2017 02:37: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.37.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:37:29 -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 18/51] rtc: dm355evm: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:26 +0200 Message-Id: <1497951359-13334-19-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-dm355evm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/rtc/rtc-dm355evm.c b/drivers/rtc/rtc-dm355evm.c index f225cd8..34544b6 100644 --- a/drivers/rtc/rtc-dm355evm.c +++ b/drivers/rtc/rtc-dm355evm.c @@ -78,17 +78,17 @@ static int dm355evm_rtc_read_time(struct device *dev, struct rtc_time *tm) dev_dbg(dev, "read timestamp %08x\n", time.value); - rtc_time_to_tm(le32_to_cpu(time.value), tm); + rtc_time64_to_tm(le32_to_cpu(time.value), tm); return 0; } static int dm355evm_rtc_set_time(struct device *dev, struct rtc_time *tm) { union evm_time time; - unsigned long value; + unsigned long long value; int status; - rtc_tm_to_time(tm, &value); + value = rtc_tm_to_time64(tm); time.value = cpu_to_le32(value); dev_dbg(dev, "write timestamp %08x\n", time.value);