From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E840C10F03 for ; Fri, 22 Mar 2019 07:26:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0749E218FE for ; Fri, 22 Mar 2019 07:26:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbfCVH0z (ORCPT ); Fri, 22 Mar 2019 03:26:55 -0400 Received: from mail-vs1-f66.google.com ([209.85.217.66]:34273 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbfCVH0z (ORCPT ); Fri, 22 Mar 2019 03:26:55 -0400 Received: by mail-vs1-f66.google.com with SMTP id t78so832265vsc.1; Fri, 22 Mar 2019 00:26:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U2MqBwNbXo7fUXIhYH4WOldqdsZmiVXbqfMjxPv2uWg=; b=S0Wr0SwmUEabPJnSDhxmjnF/+x4Yji/abMhddAeX3wl6phi+8nVT2ynNYNshgP/9eX JG/G6DCxPOLkYZpzlwVoX18et0OBlAh41T97PRHwolxDXvfsvvqvIDV/+spWerNxyvCR /hKUIJ2e8GAkCUYTLn4AWnaCOCA3Milv8cfj4hHxHCCYq+DyXBPx4y/kCvX0m4nWKBpr lZxV8D27jfR2S2Rp2orcySpjXHhNPPOi3FOeySxzsW8GgwJkxK9Dw8HlFb+T+S1TeXYd zgK7rsDi9eKq6CgS/wMJI28+hTdfxSrdUfa69z+bQsYeToYveC14PDIZzvKebZ17Exr4 GSow== X-Gm-Message-State: APjAAAVSecNpnZeOM3dLBxnSUt8u8IrQGT4qtjbwq94NJvbTq2kUo/BY Mnr5F2uLLDmUXvQdwTJASswAfifRCLcCRabzXMg= X-Google-Smtp-Source: APXvYqwTDGCNDQSA3J/wxgw1WEgwAufanVHnBujCtwdAew9Z9EPIfAnQ2sp9aFl43qMzOD+xJnLZrs6KMvjN/4x6l8k= X-Received: by 2002:a67:d011:: with SMTP id r17mr4540052vsi.96.1553239614205; Fri, 22 Mar 2019 00:26:54 -0700 (PDT) MIME-Version: 1.0 References: <20190320113010.8955-1-alexandre.belloni@bootlin.com> <20190320113010.8955-3-alexandre.belloni@bootlin.com> <20190322061207.GV29054@piout.net> In-Reply-To: <20190322061207.GV29054@piout.net> From: Geert Uytterhoeven Date: Fri, 22 Mar 2019 08:26:42 +0100 Message-ID: Subject: Re: [PATCH 3/3] rtc: sh: set range To: Alexandre Belloni Cc: linux-rtc@vger.kernel.org, Linux ARM , Geert Uytterhoeven , Chris Brandt , Linux-Renesas Content-Type: text/plain; charset="UTF-8" Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org Hi Alexander, On Fri, Mar 22, 2019 at 7:12 AM Alexandre Belloni wrote: > On 21/03/2019 11:22:26+0100, Geert Uytterhoeven wrote: > > On Wed, Mar 20, 2019 at 12:30 PM Alexandre Belloni > > wrote: > > > The SH RTC is a BCD RTC with some version having 4 digits for the year. > > > > > > The range for the RTCs with only 2 digits for the year was unfortunately > > > shifted to handle 1999 to 2098. > > > > > > Signed-off-by: Alexandre Belloni > > > > Reviewed-by: Geert Uytterhoeven > > > > > --- a/include/linux/rtc.h > > > +++ b/include/linux/rtc.h > > > @@ -165,6 +165,7 @@ struct rtc_device { > > > #define RTC_TIMESTAMP_BEGIN_1900 -2208989361LL /* 1900-01-01 00:00:00 */ > > > > mktime64(1900, 1, 1, 0, 0, 0) = -2208988800 ?? > > > > Is this due to leap seconds, and mktime64() is valid for 1970 and later only? > > > > That's a bug, it seems I didn't use the correct timezone when doing the > calculation. Thanks for spotting that, you can send a patch to correct > it or I can do it. Thanks for confirming, done. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60832C43381 for ; Fri, 22 Mar 2019 07:27:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E38420700 for ; Fri, 22 Mar 2019 07:27:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iDEGVoBU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E38420700 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FqG7NhOYbIwPO1Kt4b6iVAEowqNMfKII2BsctiTa7Jc=; b=iDEGVoBU6/Hv6B Jjthmo8TPBRsiDrC2PGYR0yp7ldnt0rBrs0Lcvzg2l6CYrCUHfwz6DLjKisxEz35CTZn9ErOLpi3j J8bUdCVrX90XlcPX2ICacBB9SQYp5vC3CwD0HCEllNXU8Im8RMF7inYWWIN1BCQEYpMUbXlaxg19G AVMHKHFFl6iu6r2lza0qlBfW5xy+bPMiuLLp6npYRpAPJBpXxb0ni/kcvL8bPNsaXO2XtaczvzTmT aAa/5Hzq+iAb1K0wEbxYY16HL44+l6qtywXnqtflLnWRA19LlqAdgRIpL3Z2SIMKvev7/5k7XHwgJ uX6VxMYOzBv5cOO/SwJA==; 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 1h7EZw-0007fJ-Fm; Fri, 22 Mar 2019 07:27:00 +0000 Received: from mail-vs1-f67.google.com ([209.85.217.67]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h7EZs-0007ex-NB for linux-arm-kernel@lists.infradead.org; Fri, 22 Mar 2019 07:26:58 +0000 Received: by mail-vs1-f67.google.com with SMTP id n14so791189vsp.12 for ; Fri, 22 Mar 2019 00:26:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U2MqBwNbXo7fUXIhYH4WOldqdsZmiVXbqfMjxPv2uWg=; b=VzbClNAjdP9hY/CGDDBRJ1tJsY9G9vMifwZF7DONIJ14/paVlS1YsR2DWJKku5t4uS 0Z3GldBuMkE9yPa4sq+Im5lnb/SHs2FmgOGM0VO/oIgzLNw7+r+wKPTlk7Ij6mT2VTp9 wm+JRGM3PTKaODS5Gqog6WXf96uu7OVckglTdxVWD7FjGXyTzbbt/hsZHV6WGfdz626J 1I4kp3ov+9iJZVSPNCHOjd8g4MeUMT2+te/16qnQVUgS6jRYIfaF7MUH5g4Twii5PCuo FSuXcYKfen+7hnuZTT2NxMXwBm5FjhArcwdKnidPWg4AMKyXcGkzsTZOgZKNC3JVEG23 RaQQ== X-Gm-Message-State: APjAAAU6yDdH1/epuiYOFGo5gYBbpo4r0p7FoWqyeC44Rp/O3uM58Xg4 S/VjkAhXt+gAYFAYCe7gsXEWjoRexFnjGplLayk= X-Google-Smtp-Source: APXvYqwTDGCNDQSA3J/wxgw1WEgwAufanVHnBujCtwdAew9Z9EPIfAnQ2sp9aFl43qMzOD+xJnLZrs6KMvjN/4x6l8k= X-Received: by 2002:a67:d011:: with SMTP id r17mr4540052vsi.96.1553239614205; Fri, 22 Mar 2019 00:26:54 -0700 (PDT) MIME-Version: 1.0 References: <20190320113010.8955-1-alexandre.belloni@bootlin.com> <20190320113010.8955-3-alexandre.belloni@bootlin.com> <20190322061207.GV29054@piout.net> In-Reply-To: <20190322061207.GV29054@piout.net> From: Geert Uytterhoeven Date: Fri, 22 Mar 2019 08:26:42 +0100 Message-ID: Subject: Re: [PATCH 3/3] rtc: sh: set range To: Alexandre Belloni X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190322_002656_749344_9DC829CC X-CRM114-Status: GOOD ( 16.98 ) 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: linux-rtc@vger.kernel.org, Linux-Renesas , Chris Brandt , Geert Uytterhoeven , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Alexander, On Fri, Mar 22, 2019 at 7:12 AM Alexandre Belloni wrote: > On 21/03/2019 11:22:26+0100, Geert Uytterhoeven wrote: > > On Wed, Mar 20, 2019 at 12:30 PM Alexandre Belloni > > wrote: > > > The SH RTC is a BCD RTC with some version having 4 digits for the year. > > > > > > The range for the RTCs with only 2 digits for the year was unfortunately > > > shifted to handle 1999 to 2098. > > > > > > Signed-off-by: Alexandre Belloni > > > > Reviewed-by: Geert Uytterhoeven > > > > > --- a/include/linux/rtc.h > > > +++ b/include/linux/rtc.h > > > @@ -165,6 +165,7 @@ struct rtc_device { > > > #define RTC_TIMESTAMP_BEGIN_1900 -2208989361LL /* 1900-01-01 00:00:00 */ > > > > mktime64(1900, 1, 1, 0, 0, 0) = -2208988800 ?? > > > > Is this due to leap seconds, and mktime64() is valid for 1970 and later only? > > > > That's a bug, it seems I didn't use the correct timezone when doing the > calculation. Thanks for spotting that, you can send a patch to correct > it or I can do it. Thanks for confirming, done. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel