From patchwork Thu Apr 18 10:00:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 10906935 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57DB41515 for ; Thu, 18 Apr 2019 10:01:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C92428C71 for ; Thu, 18 Apr 2019 10:01:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3131A28C78; Thu, 18 Apr 2019 10:01:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,URIBL_RHS_DOB autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DB50028C71 for ; Thu, 18 Apr 2019 10:01:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=z/yLl10z2DIEI+F3ryGlugb+f908yy4kV4+Fu5iLVwo=; b=j9JSxtv60pq4dH 6CblVDnG5jAoaoEj/20O8b2pJlM6j27YgDKN0TTrZqBGRcy/2jSoX8B/1CdAvYNa5CPqJ5n5NQ4IA VIZrqB2wN8+OBYxWGaBJwJuhpKr5bQNZBArkSYT8FTSMy+uBIMr2xEJIj81cGMN5BJJKkQHZGZ8p6 vdx1PCG7pcCcvr7RdXkYg1MbiDsj5flrj2H58qW3gqlyy1XGICME6GrOmwEDlIUMN8uJC+hQf0gvh W01Vd7F9glBDOWWp9v4qmhne+3n8mboZlI76+AcFON9//KbHvNiaRvfS/SlfVg9UFopnnxRXpJ908 UGuK4aOvwDv9GkGgBcMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH3r7-0007Ct-08; Thu, 18 Apr 2019 10:01:21 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hH3qo-0006qv-BS for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2019 10:01:06 +0000 Received: from localhost (alyon-652-1-176-226.w109-212.abo.wanadoo.fr [109.212.207.226]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id B0936240005; Thu, 18 Apr 2019 10:00:55 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Subject: [PATCH 2/7] rtc: jz4740: switch to rtc_time64_to_tm/rtc_tm_to_time64 Date: Thu, 18 Apr 2019 12:00:40 +0200 Message-Id: <20190418100045.29288-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190418100045.29288-1-alexandre.belloni@bootlin.com> References: <20190418100045.29288-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190418_030102_539003_26C9118C X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Cercueil , Mathieu Malaterre , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Call the 64bit versions of rtc_tm time conversion now that the range is enforced by the core. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-jz4740.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index 079469627bd7..15b6832f3931 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -171,7 +171,7 @@ static int jz4740_rtc_read_time(struct device *dev, struct rtc_time *time) if (timeout == 0) return -EIO; - rtc_time_to_tm(secs, time); + rtc_time64_to_tm(secs, time); return 0; } @@ -196,7 +196,7 @@ static int jz4740_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) alrm->enabled = !!(ctrl & JZ_RTC_CTRL_AE); alrm->pending = !!(ctrl & JZ_RTC_CTRL_AF); - rtc_time_to_tm(secs, &alrm->time); + rtc_time64_to_tm(secs, &alrm->time); return rtc_valid_tm(&alrm->time); } @@ -205,9 +205,7 @@ static int jz4740_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) { int ret; struct jz4740_rtc *rtc = dev_get_drvdata(dev); - unsigned long secs; - - rtc_tm_to_time(&alrm->time, &secs); + unsigned long secs = rtc_tm_to_time64(&alrm->time); ret = jz4740_rtc_reg_write(rtc, JZ_REG_RTC_SEC_ALARM, secs); if (!ret)