From patchwork Wed Jul 12 08:04:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 107464 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp606171obm; Wed, 12 Jul 2017 01:11:38 -0700 (PDT) X-Received: by 10.84.216.28 with SMTP id m28mr2729570pli.275.1499847098008; Wed, 12 Jul 2017 01:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499847098; cv=none; d=google.com; s=arc-20160816; b=YHqSlAhjV56Y3A5qQppiR/GUL4zJqA1qaAxFQ0RnGwq8RRhfOhei8z4BT3brtEhjMW V7G6jGPAIHIlcFKySm8CsDHJsNKkvfZqm9uZkHIoi5jdh5S2FIqqcW2tgB3u01DZXGty bnCaH08rXgqIbYizE33A60LxRO3qrNsaqJsSGFGKHK9TNNQV+vPnDU1O5ZfzHCyCXWes a+/jixE3uPpq74tY5ibIZkJTu5/piyQ5MpuXIMppA9FvIBW/qTFN3K6lfJ+wOE2JIeg4 1pPbTlszZmXlr+hJQJoLE3OuMaDXQoSZ7A7LcOa+1hDXCcInXemgDmjw97Uvufq8ied/ XrTQ== 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=X5aloLx5iRqdwhm/cP9rsH/ljiKiX7ya9yYX0i0llY0PRtyGZfq/Lg4tgj+MuVOsuF hKR4yE1bpTgqQBJXsSGK+W56AS+/XszMaKyC7bWL9V4vAiiJ07wOwM+dgElWqXVBbB7p mm4XQLAxjZVY7nxFJW89KM0Y8l5pibJdDtAkldAwj8La21QHgCFVn4IacywqEU1heisS qjfxNJTUbR+8sjMhfTeMXEVDZf5ufaOIFFOD/1NWnEUWqXLfxCiJUPCCEEr0bQGIt9ky NBsCTS1Kn2Xg4eYnheCj8pNj1WNOciTTcq4Ltk50F0eHPikPeEWimhyMrVr5AylcSTao dUQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=TP260OU3; 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 a62si1396280pfj.336.2017.07.12.01.11.37; Wed, 12 Jul 2017 01:11:37 -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=TP260OU3; 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 S933775AbdGLILT (ORCPT + 25 others); Wed, 12 Jul 2017 04:11:19 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:34889 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757033AbdGLIFh (ORCPT ); Wed, 12 Jul 2017 04:05:37 -0400 Received: by mail-wr0-f175.google.com with SMTP id k67so22370761wrc.2 for ; Wed, 12 Jul 2017 01:05:36 -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=TP260OU3J5ty4JVP4dxGiLV0n5OnLpYpF/ztwqBZb4zGuZw4WWCYn6hI8/VfPoxSHK 5uOZCLrUWkXuIylofHFvkiufXMwNIOrdb82OdY9byFcFYKwU7LnU1YiLEq/Xj4CJjaKK 67EB+BLkB+/rEUWTHGeqCAJt6Tpj4Vz7hdedk= 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=nL8hgkwDXZjGgBXHEHeRI50hgmIJmfoj5Hl9RZ0yd+bbwGPNxtLRo+B2lDv8m9GGFK bVYAkJB1qJhzl2nWzfwN6hfhZwACbBWh5tLqy71EmFo2Jj9DzXN6eAjUD+3pHDCW6q3o NdX1kcwpo3A30W0gpdGdnoz7xCCnU3rPZ+rWZ8h/Ilov3+olkPpOoP6EZAbac7xycMBk a33qH21JAUx3krseX5Au4nD3hd3L07eHilQAwVBJHRqsIsUakJAi/Hln444VyV4nRzrF k48px9e7lvLrqlG4Y1JGkP8KuFwjaysBZBTKDIZfEymYL34jV3z5x/yZRCsumnlD33Fq 0GsA== X-Gm-Message-State: AIVw110MEsvNjgDuSKXdLBXIZq3UOhEIELtDxUriWM0V5QnNdhsttD7M faGBuOdjAUJjG5pW X-Received: by 10.28.149.209 with SMTP id x200mr1604983wmd.91.1499846730557; Wed, 12 Jul 2017 01:05:30 -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.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 01:05: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 v2 13/22] rtc: omap: stop using rtc deprecated functions Date: Wed, 12 Jul 2017 10:04:33 +0200 Message-Id: <1499846682-14093-14-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-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");