From patchwork Wed Jul 12 08:04:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 107457 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp601950obm; Wed, 12 Jul 2017 01:06:34 -0700 (PDT) X-Received: by 10.84.224.206 with SMTP id k14mr2729266pln.72.1499846794694; Wed, 12 Jul 2017 01:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499846794; cv=none; d=google.com; s=arc-20160816; b=S6iaE4UeM2CbO501824UtQtdO8IQUTd3/xKZ7RMA7ssOAgjrLLLF+c3iN80ujBXGfG NnEZiRjKGgZx4DuEsvKI02vhZbc4afyDuxpbn4B4+5kmxcaHCIX+6/4OkSc4boenjeMH 222i9yx7lzHvcDGmm7+3errCTfk/AOQ3lpFH6ME6k0NF1gjrEMQZozSmgevD/f5aBqhZ AbcweFRJ8ck/dpcmAz9HRYAcHKXPM4yXgs2+GD2OkDA3tAs4daepvMqwCBUCzEeeXLmg RDOaO6BYvcUdpEr2QBoljJ8j3zOiMUrwZ6utCHh2F/oOwbeNLiui4im22K47JIa72ZD6 V3Tg== 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=ARQa8GyhVDpcFuujn3ZNl72PCG/Y63NaeTduxe2y3XUlWXxcZTyTwfg1jR/j+GbmWy L+6OOhb5kUcgh+ZcKq3NyRn68UpxMUHQG0ANSU0Oh1HgBYM6cO2zWfqldbt5wJFhH72y PQjN7vbU1DawWWnU2Guc0JC2XtWJEfQh5yqZEVwpsOE5g/azwqw2JAHZhJpKZMZc6hQn zBPXBgyAr9yaNhuMsO/NEuAKkrkH/6Ayw4IPxlD6q30lMuZwptpq7CfKxNH6quCvGjUF qiKMjVJHeX6p0N30Ifaja25lwv6j9DoKRxq4dlxJgzP8iMALCstAxdvmu6jT5oRMF8z0 IopQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=CiRSfqqv; 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 79si1468065pgf.431.2017.07.12.01.06.34; Wed, 12 Jul 2017 01:06: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=CiRSfqqv; 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 S1757115AbdGLIFx (ORCPT + 25 others); Wed, 12 Jul 2017 04:05:53 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:35079 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757090AbdGLIFq (ORCPT ); Wed, 12 Jul 2017 04:05:46 -0400 Received: by mail-wr0-f173.google.com with SMTP id k67so22379018wrc.2 for ; Wed, 12 Jul 2017 01:05:45 -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=CiRSfqqvX7LxMCnDTHOOkKbOvFPsK8ZIAgk7xYiuVPg7AR5QjroP5vfmZ1dWLLJQB/ /OG+nyNYv0xaduRdwV8xAl6Hshh2guhnjbKulySTaFYn7wbsRcN+9KcJfb1UrFH6p7tH UGFjaP2dQiuRwLxyzUfR/Ec1yHt1p/s2UFTiM= 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=D7mnq/nqzWxRwRkney1FPcu5YqUVzX2QJ76r6rfeL8uw6lObbFCsdq4vdVII04Fxq6 fg02TnbSiGSyH8YFwKgLznaqtCAlZDGctt3mBd5rIriFObwr5XUIbN90qKpKdrb1lbsB XZ129dgDtD2XMGp0+p1/JGyddBkEFwuix/Hx2anuRhRWlqMiv+FoYpbxHaZz3ltJOWhl /Z6XRwIeqSUkOaMjGonkUEfPr0Vyk+wXz/GCWmybcBLXGwTJ3n6EYp60f5YZl6SOf+Hf 3ylrGqlbHHGiYiQr4hyGNkuLKPXdAkZJGGxKQl5oxX7jhUNVIp1EN3glnVFlPMDv63QL /idQ== X-Gm-Message-State: AIVw11147BSMSU528exqItvrFocQfRxFX9J3VGUWNB2isgMHXlUwiReD rGUPmcbektGFejiG4IWnOQ== X-Received: by 10.28.139.145 with SMTP id n139mr1548382wmd.53.1499846744789; Wed, 12 Jul 2017 01:05:44 -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.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 12 Jul 2017 01:05:44 -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 21/22] rtc: test: stop using rtc deprecated functions Date: Wed, 12 Jul 2017 10:04:41 +0200 Message-Id: <1499846682-14093-22-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 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)) {