From patchwork Tue Jun 20 09:35:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 105975 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1277910qgd; Tue, 20 Jun 2017 02:47:40 -0700 (PDT) X-Received: by 10.84.192.3 with SMTP id b3mr34932710pld.76.1497952060305; Tue, 20 Jun 2017 02:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497952060; cv=none; d=google.com; s=arc-20160816; b=ir2SOtq2ztpMF21x87osl4Adg/yLXjoFO3oMwqx80ru9bDBsCLXoXyvhfovLdE/Fos hh+BL9FDeHymbxOU1o6i2HE6lwhIDu2cFzpz9hxa0vNKZkXb3oVfOmeNYtkuatz6ZLb9 g6XhUKKhydeA5BHWBewdRXmy3JhC+PR/8r3n3P6LBZpgDoUOU5uL4MQQypsHAEY9eAK8 RPqRhsNkxOtDCJS/25EwIYKJTdHSrbbMOeP0xfpx9rOuqVQaI7pmGQhwaY3BnWVum2TO 3TqnM+gi3m4l+Sp1Be/DwBngzsThC503oHz24MbpXERw8wIklcaWlXiuoqYQmNbExjmp go9A== 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=zc06aOWP15P1ICI/HhIDyt0ckkJQmcRwGlFQtluYMEQ=; b=odK1DM+Firgxa2Njtp6+II+ONyV1MFlPGMQT57fl6jiPoq2mkvKO/cfzieytdpT8Ih u1dPOJgeue5mQCdD5JuqCNTXriK+nSh9+BljMelK/v2k7sXI3nYiOklSNoK10/Ptu+N7 3mOMNFjvjB1WxuqNBwuIpUc8jid/1xX5ZP4YNrIbm2KOPi5adkme4KEkrTQ1V49rzGGV BHaFW042Psvb2FnBlJpBzLNPIj1UcjC9yI93HcjiXiQS93jhjBDCamcenP1jNSvN1Gl0 LxrbI70Zr+e2mL8bPHi/QolqpApXCudSals2Bh3MVRMXMRFEpzNf+yQ6UB0RSej13rnW U2Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=FhuffSQB; 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 7si11166341pll.589.2017.06.20.02.47.40; Tue, 20 Jun 2017 02:47:40 -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=FhuffSQB; 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 S1753151AbdFTJrZ (ORCPT + 25 others); Tue, 20 Jun 2017 05:47:25 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:34257 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752958AbdFTJiP (ORCPT ); Tue, 20 Jun 2017 05:38:15 -0400 Received: by mail-wm0-f49.google.com with SMTP id d64so23694577wmf.1 for ; Tue, 20 Jun 2017 02:38:09 -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=zc06aOWP15P1ICI/HhIDyt0ckkJQmcRwGlFQtluYMEQ=; b=FhuffSQB9NVA/ZeHA+rvpKNUzp9WKNFOfGJdNjI2Jjtzu8vWFqLls8tYiyU97dA025 7kzCUojeFbCpXeV3EMW4M442Sd4qW6/ov1DAc3BPLWABnrf3tYL2+nqbQkgbwnuhoYu8 UL8VnsyJ3A3ZR0/kOlgUKN4qF7W4KLxc6njgQ= 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=zc06aOWP15P1ICI/HhIDyt0ckkJQmcRwGlFQtluYMEQ=; b=oH+hKhoHo7cF/9c8y6fLIVjYl3e/qeOdvcx7sZ4a8c3K85Uw8ZBOXY3SYs/58JBo0m WrcFyvljhudJgQJoNk6jAlRU/P2EDpkLpH7k9Xp1PnPuhST81z1wekrpslNXWnjOuxo/ 4KTyTkoGUSJuUXseBwR459KgeVhl73xfbvPLTFNHLOc8C6vniEI+2gdmOGBpUs9cipHV +inf3c+sczoOzKnT+0cXwXBhToOUcTmqLmQh+wtws6zh+mKpl82cKFtbtT6hlxZdjqZi m4Z8W3aLzdXF1MZBbsDENXobGxHceeqBG6XD4CsskppEJnX186c2LLvXtp3PjzqXMLwc tOLw== X-Gm-Message-State: AKS2vOyw4IdCtiQoh8X24dK9PKgoTlsxCJAjyxWoM8bIjf8JjD+4y9Dy gvnzROBE0ooDHi7U X-Received: by 10.28.6.77 with SMTP id 74mr1931071wmg.96.1497951489143; Tue, 20 Jun 2017 02:38:09 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:38:08 -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 31/51] rtc: omap: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:39 +0200 Message-Id: <1497951359-13334-32-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. For the same reasons use set_mmss64 callback instead of set_mmss 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-omap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index 13f7cd1..8aa3957 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -432,7 +432,7 @@ static void omap_rtc_power_off(void) { struct omap_rtc *rtc = omap_rtc_power_off_rtc; struct rtc_time tm; - unsigned long now; + unsigned long long now; u32 val; rtc->type->unlock(rtc); @@ -443,8 +443,8 @@ static void omap_rtc_power_off(void) /* set alarm two seconds from now */ omap_rtc_read_time_raw(rtc, &tm); bcd2tm(&tm); - rtc_tm_to_time(&tm, &now); - rtc_time_to_tm(now + 2, &tm); + now = rtc_tm_to_time64(&tm); + rtc_time64_to_tm(now + 2, &tm); if (tm2bcd(&tm) < 0) { dev_err(&rtc->rtc->dev, "power off failed\n");