Received: by 2002:a17:90a:37e8:0:0:0:0 with SMTP id v95csp8825443pjb; Tue, 1 Oct 2019 04:49:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV9o+J5qSRyAY1Zv/qAkI4bIm9MelCyFUz6Di7YmlO6HwjEoyc2cd+T3LcLGvosy4gc+1y X-Received: by 2002:a05:6402:2d8:: with SMTP id b24mr24889252edx.222.1569930583986; Tue, 01 Oct 2019 04:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569930583; cv=none; d=google.com; s=arc-20160816; b=olxbszsfxVFH5571EzNtws8ILO3Ugk8ZHfL+9GecfLl1ruLGENmMWD83RUZGIHyZqh EAhqhfb86fnvIwa6oJBidSzlRbCBacqykcL5jcvMFIikGoAS/Wm8u56QVnlLeFvXmFcO 5OZT3PJKG1XGd779o3VxJHIxWjQBrhwcWhy/DIDNAO9DNWvCvW9rT+U+EqP8UFQUwz9q XKkl+9hyA3bK0yyFBl66v9t4Yo2dOlUAg4qjdZ5cBMDhH2pwl4ajFHrqMvJtkOZN3hy8 8TvSOwNlRAimoMXFewz9CPQ0tizyZy65ZiT94JWpaFpkmzX4EXzlb5vqqbYgvBkdLB2G 66AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XWJl4Ughq8Brnui9HUXPgvSrbevcKGx4VBeGqVH8i/o=; b=rLVvlj28UXm0CdjxfE1IA7C0glXcI85/vAIUrJnlgAPpjr4Zn1bpig8y3dDMGxoFBO 5hC+qf1JwTBNuCyUMxe1yJc88heRLUFr6SpcdxacOFldUhf/8vkYscoB4MaAFP5s8O8b Uc0/1DnLAd9ieormDpUdtwagM7bmFM+3aj/ikbrjEwS1JCaGlFSUajPdmVvbF4krQKrg HJLQnrECpl/cW5VJsciIRQzeehWaMH9W06UrV7DXNwHff9JMhj0D2xp8GhevePKZ8B9Y LO5weamGrwWAtlmF5rbZXn48dtybdzN9gfJokjPLifPJaXyX3uGQfugmN2tsObyXsDpd bAtg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oq24si8631806ejb.202.2019.10.01.04.49.19; Tue, 01 Oct 2019 04:49:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733294AbfJALsX (ORCPT + 99 others); Tue, 1 Oct 2019 07:48:23 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:54963 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbfJALsT (ORCPT ); Tue, 1 Oct 2019 07:48:19 -0400 X-Originating-IP: 86.207.98.53 Received: from localhost (aclermont-ferrand-651-1-259-53.w86-207.abo.wanadoo.fr [86.207.98.53]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 5E57B1BF208; Tue, 1 Oct 2019 11:48:16 +0000 (UTC) Date: Tue, 1 Oct 2019 13:48:16 +0200 From: Alexandre Belloni To: Andy Shevchenko Cc: Petr Mladek , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Hans Verkuil , Mathias Nyman , Jonathan Corbet , Thierry Reding , Jonathan Hunter , John Stultz , Thomas Gleixner Subject: Re: [PATCH v1 1/4] lib/vsprintf: Print time64_t in human readable format Message-ID: <20191001114816.GA4106@piout.net> References: <20190104193009.30907-1-andriy.shevchenko@linux.intel.com> <20190108152528.utr3a5huran52gsf@pathway.suse.cz> <20190110215858.GG2362@piout.net> <20190726132037.GX9224@smile.fi.intel.com> <20190930200809.GK3913@piout.net> <20191001113655.GI32742@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191001113655.GI32742@smile.fi.intel.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/10/2019 14:36:55+0300, Andy Shevchenko wrote: > On Mon, Sep 30, 2019 at 10:08:09PM +0200, Alexandre Belloni wrote: > > > > Maybe be rtc_str should take a struct tm instead of an rtc_time so > > > > time64_to_rtc_time always uses time64_to_tm. > > > > > > Because this one, while sounding plausible, maybe too invasive on current > > > state of affairs. > > > > Well, if the kernel struct tm had an int tm_year instead of long > > tm_year, then you could simply cast a struct rtc_time to a struct tm. > > I don't think so. It will be error prone from endianess prospective on > 64-bit platforms. > I don't get why, as long as the first members of both structs are the same, this should work. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com