Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1009826pxb; Thu, 21 Oct 2021 13:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2Chu8ELoJlFeUVRrzLiJY0f9zlUFM23NAwSJe25faLsQYDIyum2/iXFSILJyF7dZ1UVeP X-Received: by 2002:a17:907:1006:: with SMTP id ox6mr9920542ejb.146.1634849913308; Thu, 21 Oct 2021 13:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634849913; cv=none; d=google.com; s=arc-20160816; b=r4x+z8KWUWFDh4Wxc2cXAWBRjSEexAc5x9Jt8Kfg/J4gU+eKXFTul9Y1o/aDzzbNbB Z61McpPvcGYkha8fl/PZuqO4TZIVskHssdNtQjAxw1IwPdEVOgCL9InBMjWeXHHL4MTf wIPZzQs5t46nH77V9mS6wpX28iqCPBpqzBEL67SPg8M0/7XrWXwptI6Mvp0JkYpKyf+R sC4nqd+7EzFlDIg6GVMMQcec9TsGI4TECRsqj1aHZDvlKOahtZz+U5UPMEFp7H6fkkIU kUX5oBnokvLOSlYxDvhtNvrJbNe3m3KvzuR5zl/3vWuOyfaJiUiZcqPGz8LLw71JF9Sg jUeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=MvyvV5NANFeRQop1av7ylLf8zJhWSnb5C3ntL6jdyPQ=; b=0aaQ/k5aFkvqQzLgs11FGS+1e5NQ/tD/i8y7IBVqfAQ26q3799kUSozEFz14qzIx39 d/bvnQQM/QMPGffJx7GKwwaVxhst+6XSjQB81nRuAdJ9fA1/7sCBLZ2GDnE3hjhdhSO0 eOCgVvBUDuKfS2ze0AC1lxIxEKCnfPibDzO9Gw/zoctS/AvG8s2HtDAWpTvZniXLYGy7 2VILpMeRmTdzvBtUXI8E7kknvVZmDNFNcPy+51FEVkDXZnxRdbyD/6NRnc6+XJtCPptj VSfFiuT1slv1jADu8eZ8YAmCh1S79UuU2rwcAbh1AbSjuxISWLUG24NtrTYDvdm+gR8/ oAeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sg18si13652340ejc.10.2021.10.21.13.57.56; Thu, 21 Oct 2021 13:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232025AbhJUU5V (ORCPT + 99 others); Thu, 21 Oct 2021 16:57:21 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:46149 "EHLO relay7-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230272AbhJUU5U (ORCPT ); Thu, 21 Oct 2021 16:57:20 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id E2C0E20004; Thu, 21 Oct 2021 20:55:02 +0000 (UTC) Date: Thu, 21 Oct 2021 22:55:02 +0200 From: Alexandre Belloni To: Sam Protsenko Cc: Krzysztof Kozlowski , Alessandro Zummo , linux-rtc@vger.kernel.org, Linux Samsung SOC , Linux Kernel Mailing List Subject: Re: [PATCH 2/4] rtc: s3c: Add time range Message-ID: References: <20211019131724.3109-1-semen.protsenko@linaro.org> <20211019131724.3109-3-semen.protsenko@linaro.org> <6dbd4812-bac3-55dc-108e-c322e8a493de@canonical.com> <6ce55971-bee5-1bc9-c3a2-28e6ede37401@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/10/2021 22:48:51+0300, Sam Protsenko wrote: > After testing thoroughly, I can confirm that Alexandre is right about > leap years (Exynos850 RTC treats both 2000 and 2100 as leap years). > And it also overflows internally on 2159 year, limiting the actual > time range at 160 years. So I'll keep that range at 100 years for all > RTCs. As Krzysztof said, there is no practical reasons in trying to > increase it anyway. Will send v2 soon. > > What I'm curious about is RTC testing. I've found this test suite: > > tools/testing/selftests/rtc/rtctest.c > > But it doesn't seem to cover corner cases (like checking leap years, > which was discussed here). Just a thought: maybe it should be added > there, so everyone can benefit from that? For example, I know that in > Linaro we are running LKFT tests for different boards, so that might > theoretically reveal some bugs. Though I understand possible > implications: we probably don't know which ranges are supported in > driver that's being tested. Anyway, just saying. > Sorry, I should have pointed to: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/rtc-tools.git/tree/rtc-range.c This does check for the actual range of an RTC. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com