Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp688004pxb; Tue, 19 Oct 2021 10:51:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxSqZWpy6b8kFsVEYD8TtNiIO6Qb9i3DuExDwRjzr0Bf7Cr3FE6Nc/IvrNjwkDKsCDkdlB X-Received: by 2002:a17:903:124a:b0:13f:cb85:1a3a with SMTP id u10-20020a170903124a00b0013fcb851a3amr8151478plh.32.1634665863230; Tue, 19 Oct 2021 10:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634665863; cv=none; d=google.com; s=arc-20160816; b=N3HT/chwrz0ViknfW3h27kH15ieiRVCvZBukXCi+JcXHQNNM7kfozRCAICx0yggzEz ZiR/0X0VlEfGxxXYQoG+pyUxvFnP3eYJSO4rp+zAkw9FexyIRDAnxVChrUXxCPIdLTV8 jPROavIijknI0yHC1v4+BZ16yDTcscyDhc9MB/eA5e4zKKZrB+Bd/1vIp6HXFyaeE39Q sFYBah9zid4SoOM11NhTdIVxeNZBP+ib0/R4ymTOXxyTE3JVLNg6PC1XX58joYO/0IHV yBgw70BVigsQuuWuNDdXTI0KQT/6RwZJfBH/QukwcMpM+EPmw5TgrMD/7BldQdl2xGOx M6fQ== 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=4GnnzPq3cuJ27BuhwrIo2uKPIhEqtaVxQAxHZ1AdbHU=; b=FpApisJmDFY0xH60g7sc6beGkBwuOecFiVnQ47XUtL53AgZuF7S8MQ4s+pX9Fdroew piwO92JE1eVmUrCsb8IosdPW6stAhes0f6FHxZLRileRCLL9FEM/wbXRsLN5lsOz5xM/ CJT6+AdQ8i2IOfYH7lX5PgKVc2azPZewMUavFYTZDVlGONs323jih9VfoGqqrRL+7ytk lZCP+dIPeUiwaVXtWcL8aCyHaSs4Z/txigNJwpXgQ+Md3EA8gprOLy163kvNiQTYvYIK f4kQl5dUmFkG91/PXcJRbmf6qh/l1K2oFPvRG54KAQZ3cMfr+nW9pp1ScCRZOZBqWw4M m3ZA== 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 b15si16687230plg.434.2021.10.19.10.50.50; Tue, 19 Oct 2021 10:51:03 -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 S234805AbhJSRuo (ORCPT + 99 others); Tue, 19 Oct 2021 13:50:44 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35173 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233613AbhJSRul (ORCPT ); Tue, 19 Oct 2021 13:50:41 -0400 Received: (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 7A38E240004; Tue, 19 Oct 2021 17:48:26 +0000 (UTC) Date: Tue, 19 Oct 2021 19:48:26 +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 19/10/2021 19:35:26+0300, Sam Protsenko wrote: > On Tue, 19 Oct 2021 at 19:22, Krzysztof Kozlowski > wrote: > > > > On 19/10/2021 18:17, Krzysztof Kozlowski wrote: > > > On 19/10/2021 15:17, Sam Protsenko wrote: > > >> This RTC driver only accepts dates from 2000 to 2099 year. It starts > > >> counting from 2000 to avoid Y2K problem, > > > > > > 1. Where is the minimum (2000) year set in the RTC driver? > > > > Ah, indeed. I found it now in the driver. > > > > > > > >> and S3C RTC only supports 100 > > > > > > On some of the devices 100, on some 1000, therefore, no. This does not > > > look correct. > > > > That part of sentence is still incorrect, but change itself makes sense. > > Driver does not support <2000. > > > > Driver itself does not allow setting year >= 2100: > > <<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>> > if (year < 0 || year >= 100) { > dev_err(dev, "rtc only supports 100 years\n"); > return -EINVAL; > } > <<<<<<<<<<<<<<<<<<<< cut here >>>>>>>>>>>>>>>>>>> > > Devices might allow it, so the commit message phrasing is incorrect > and should be replaced, yes. But the code should be correct. Should I > send v2 with fixed commit message? > It would be better to pass the proper values because else nobody will ever come back and fix it (hence why I didn't move that driver to devm_rtc_register_device yet). -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com