Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp455930pxb; Sat, 11 Sep 2021 10:08:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvRH2CVl8aYbVZIsHfO9U8eIAGhAiliLw398fjSg8Xuqb0oajDEFOU8y+FB+KZTQP7X+OW X-Received: by 2002:a92:6907:: with SMTP id e7mr2355684ilc.301.1631380101451; Sat, 11 Sep 2021 10:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631380101; cv=none; d=google.com; s=arc-20160816; b=0oLqWhFuCK/uWFtzkIyYvHqNmiBOXIr/NjBXWuSHphfMjLG10MvPLY6sbViY+H1o+P 2BG7E3IRG/jgWTWBn/GaF4fIRcZKGCo6mHbSZ9ONFvJADeHY0frEmdYv3r+jVBERmlrN WnsaPz6D2/nAhBCB2kLt2f735Hgrbzw0r8dnPsD6faw5p1wlU9PKISYElGwNomLE0+6O vNs/YdY3uBrMS5rWRBWGi4BgE6YIm2PVwLhMnckdXfqFrPiTaF9W6zIdK+rSRZmib4yT rtnGDvY0OBl3OUTPGCa2ttO+WGhHG3jhI1gCvHfcUXtKip4AYQrnSYjQrYr3LZ98V0O4 48JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=nyaNa5jh7u4OrH4aT60jYwA/34rGKStvVyqkKWK4Gkg=; b=ZyQoukH3qwJDGxF9IWSG7hCfdImywOLySLTI6SkAVkFG7LnRnMnx64JOedgIz7nxHM XyJ3VYlfn4Y1SjkX7sdV/6vv9g18Hd/Zx3UtByxwTtcoXC5xFGM+dQF785JzPrR06W4w /xDCKemoty7EuFUOJIdvRGFxi+i1Kgn0wmvsSeRXFbBvGfnVt0obDBMqUBF0JZ35gndC lElIWtoft9wlN4nz5BAuxuwidfyhvttkT/uBP9hFV1sVaqiahUK92OTHbHm+twb3Zius yBMXoI8O0yvXDhM5v0uPMMxkPHor1bUGTS7zn1EwjC7qn+0EH5uF6JzKtFFqQCpGvV0M aBCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Xob4PFHN; 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 m1si1967171ilu.13.2021.09.11.10.08.07; Sat, 11 Sep 2021 10:08:21 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Xob4PFHN; 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 S231976AbhIKRGf (ORCPT + 99 others); Sat, 11 Sep 2021 13:06:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230018AbhIKRGe (ORCPT ); Sat, 11 Sep 2021 13:06:34 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7738C061574 for ; Sat, 11 Sep 2021 10:05:21 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id bq5so11072095lfb.9 for ; Sat, 11 Sep 2021 10:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nyaNa5jh7u4OrH4aT60jYwA/34rGKStvVyqkKWK4Gkg=; b=Xob4PFHNa8tZ1GDNjHJX5f6b7gNZu+EbwhD3b0fGvMBPIGOZr2rUsTbSEsh9InOUxs TTOYUWIuKPiD9z0fhWWjBnl+oUe6UI9fnZBkhfxTQ+zIYbjEjHhks9fQBPotpWyssRUB peWcciku5OOo5siPQRO5nFhOP853uQDyf3HiE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nyaNa5jh7u4OrH4aT60jYwA/34rGKStvVyqkKWK4Gkg=; b=o6i0bqzZclz+EGO4XyMBHOHDXkC4n9ccOHuEAjCExqW20IEnG5E60/PIQ/wWtxmWNH J5z9cl6aNa++tkjp1it9NZf5sDTzCJTYFZS0K0u9Rqrzi2Jy/OynXwVtHy5GkUCrQcIw f+2letq/wHZ69FnAXTAwlaylg4TEl2IY1d9ejFibi3MVj+6ZOxwnUqKFyk5AScjMouPM yKjHAD+HxkUDqXxj/UPoCh++h34DeMaAM/Zq1Hz1w/tSoA/EDsFdR1UKCvOjwZqaxahr +yFEoJVVVZh0TUwIFO+tfokNmasWs3olGlQLY8ixfUpiT30UaQde/aFrl6O1/t2QY500 LcNA== X-Gm-Message-State: AOAM531oMvw7fDg4ysYQ+tMj3WeOOjSscJXInBiQagEK7Ta82JUnLTRa 2Y2hDljWI7S2dV0MgtCp1cH5E3CPYz1820YAWDU= X-Received: by 2002:ac2:5ec2:: with SMTP id d2mr2639902lfq.250.1631379919941; Sat, 11 Sep 2021 10:05:19 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id a7sm254146lfs.309.2021.09.11.10.05.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 11 Sep 2021 10:05:19 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id g14so8784142ljk.5 for ; Sat, 11 Sep 2021 10:05:18 -0700 (PDT) X-Received: by 2002:a2e:8185:: with SMTP id e5mr2798909ljg.31.1631379918659; Sat, 11 Sep 2021 10:05:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sat, 11 Sep 2021 10:05:02 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] RTC changes for 5.15 To: Alexandre Belloni Cc: linux-rtc@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 11, 2021 at 8:59 AM Alexandre Belloni wrote: > > The broken down time conversion is similar to what is done > in the time subsystem since v5.14. By "similar" you mean "identical", no? Why is the rtc subsystem not just using the generic time64_to_tm()? Yes, yes, I realize that due to historical mistakes, there's a duplicate 'struct rtc_time' struct, but it turns out that that is _identical_ to 'struct tm' except it also has a 'int tm_isdst' at the end. So you could literally make a union of the two, pass the 'struct tm' part down to the generic code, and just do rtc_tm->tm_isdst = 0; at the end. Rather than have a duplicate copy of that admittedly clever Neri and Schneider algorithm. Hmm? Linus