From patchwork Tue Jun 20 09:35:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 105958 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp1275363qgd; Tue, 20 Jun 2017 02:39:43 -0700 (PDT) X-Received: by 10.101.87.206 with SMTP id q14mr30084570pgr.153.1497951583456; Tue, 20 Jun 2017 02:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497951583; cv=none; d=google.com; s=arc-20160816; b=ytKEzTpyte8gAo8grq0ZKu8Cu4h99lRedsenNue4nacX2EcnWbfWQSO1AO2WfFf41a OutF1B05hOFZetKTNedfaqxZS5FJMUvscfm/v6xnJCOVSFBLIhug8o7b6i/TgfUurueS mQC6D+uBAjlZrqf4QNfcRveZ9/vei0gz6MIxt9JLAA2oYDy0/G73gxeDZ8hFAiS37KZt uftrlBXDbZllVuN0oDLF0r9WEzcUmRxQ9KYsbPyvTqJR5v1eJrFV/e3trqIV6iFPZP7G nLLxmg7CgNC1/40g/0fG8VRGzqlXfvu2Ra/8I7sXeKAtFW1tc/np3aXY1iXd+PZKwCYr 1LdA== 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=iqQr83CJ1dqKj7bTHVC8gxIYGU/LCXCyQ9F13lG7xSU=; b=KhJkBp8Z62qqRJPyG30HY6r3XIKJcu9Yocq3Z0PQZrK9fEkNxi6oaM10grEuzDfv51 MNHdmLsGEHwT5gcguGCwI/O4b164XwG1fJpRZTGAUIJ+Gnb7pAOrM5coQXaHsLcbWfLS V4fIxqvhVePKXeBEVxCE1JFtFMhBJc8A3PHhXImSIo2zua4tbss81gKOgOFYKcC95ntS ul5D4X1WImo0RS0PCXJLSLItZSVNIifn0Em7J3Ct3k8RjdCDr9szkJV53VaplLOJxz1v ClwnE4i8RR6C17BrMgkXbPu95tzxMCVmT5piXMuLg3QGL3VmRg9Jbq5QqsdU7owD9Bj/ n/Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=Kf6r+7wK; 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 d6si4535637plj.558.2017.06.20.02.39.43; Tue, 20 Jun 2017 02:39:43 -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=Kf6r+7wK; 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 S1753148AbdFTJio (ORCPT + 25 others); Tue, 20 Jun 2017 05:38:44 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38108 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753046AbdFTJig (ORCPT ); Tue, 20 Jun 2017 05:38:36 -0400 Received: by mail-wm0-f54.google.com with SMTP id u195so14588192wmd.1 for ; Tue, 20 Jun 2017 02:38:35 -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=iqQr83CJ1dqKj7bTHVC8gxIYGU/LCXCyQ9F13lG7xSU=; b=Kf6r+7wKLrxP1W0iiqFHhYX+HcHyx2JTxC8LR2eZY6oT46p7/5nH/4LDc+ZlqwBAzl hmw646I6Vncj9jaF0gYrJMsHTpd4FbZaW7K4uVTb0UJgffP2rC8bVpintAiul75nCTeR Tseyjj0jVaXfkYugJcbVueuF1ku/gHYDb440k= 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=iqQr83CJ1dqKj7bTHVC8gxIYGU/LCXCyQ9F13lG7xSU=; b=TbjMtw2ma1kRzalvnb/OS5RRLu5T7zRH2nwibwqwmWhygimkNuv3RYFyT8ynzlKtZi Cz3anV3ldNRT7zzGv66pPgCSJson4qG26Ujg4C24RYl70EFNnHWV2DCbEZTx0A6mvcJw VWiJ5tcK13mdYQ7CYrmHatfxGqaDyO0b/yftkXLy74k3X86B0BxOdnML48QMBV2WtVjp XRDEVlSM/R+2tkI2P03ElwrBM/83L8jelGHipYXHNcLqATd4PyzmA/KQ8g0Ugf/ak5y3 ZFZpVX5Fftk676eLdE0RbAFe1wNqx1Po8BNGVkCCQT53cwTFpb8L8OHGJSjed+trDOZ5 YS2w== X-Gm-Message-State: AKS2vOzY20HlFSxPg0ekQlBxRaWWmFMKCAwTle5IIUiTt5reBqkqgZKD 1ZANdh9d+vOZwW/A X-Received: by 10.28.178.198 with SMTP id b189mr735726wmf.106.1497951514884; Tue, 20 Jun 2017 02:38:34 -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.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 02:38:34 -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 46/51] rtc: test: stop using rtc deprecated functions Date: Tue, 20 Jun 2017 11:35:54 +0200 Message-Id: <1497951359-13334-47-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 Since only set_mmss64 be will used remove module parameter. 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-test.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) -- 1.9.1 diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c index 3a2da4c..6a460e3 100644 --- a/drivers/rtc/rtc-test.c +++ b/drivers/rtc/rtc-test.c @@ -13,10 +13,6 @@ #include #include -static int test_mmss64; -module_param(test_mmss64, int, 0644); -MODULE_PARM_DESC(test_mmss64, "Test struct rtc_class_ops.set_mmss64()."); - static struct platform_device *test0 = NULL, *test1 = NULL; static int test_rtc_read_alarm(struct device *dev, @@ -44,12 +40,6 @@ static int test_rtc_set_mmss64(struct device *dev, time64_t secs) return 0; } -static int test_rtc_set_mmss(struct device *dev, unsigned long secs) -{ - dev_info(dev, "%s, secs = %lu\n", __func__, secs); - return 0; -} - static int test_rtc_proc(struct device *dev, struct seq_file *seq) { struct platform_device *plat_dev = to_platform_device(dev); @@ -70,7 +60,7 @@ static int test_rtc_alarm_irq_enable(struct device *dev, unsigned int enable) .read_time = test_rtc_read_time, .read_alarm = test_rtc_read_alarm, .set_alarm = test_rtc_set_alarm, - .set_mmss = test_rtc_set_mmss, + .set_mmss64 = test_rtc_set_mmss64, .alarm_irq_enable = test_rtc_alarm_irq_enable, }; @@ -111,11 +101,6 @@ static int test_probe(struct platform_device *plat_dev) int err; struct rtc_device *rtc; - if (test_mmss64) { - test_rtc_ops.set_mmss64 = test_rtc_set_mmss64; - test_rtc_ops.set_mmss = NULL; - } - rtc = devm_rtc_device_register(&plat_dev->dev, "test", &test_rtc_ops, THIS_MODULE); if (IS_ERR(rtc)) {