Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751507AbdFHStg (ORCPT ); Thu, 8 Jun 2017 14:49:36 -0400 Received: from mail-qt0-f178.google.com ([209.85.216.178]:36653 "EHLO mail-qt0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbdFHSte (ORCPT ); Thu, 8 Jun 2017 14:49:34 -0400 MIME-Version: 1.0 In-Reply-To: <20170608184154.y7tqsv7ghpbcbf77@piout.net> References: <20170608134811.60786-1-andriy.shevchenko@linux.intel.com> <20170608134811.60786-5-andriy.shevchenko@linux.intel.com> <20170608150540.rek7a4akuxm3k36l@piout.net> <20170608184154.y7tqsv7ghpbcbf77@piout.net> From: Andy Shevchenko Date: Thu, 8 Jun 2017 21:49:33 +0300 Message-ID: Subject: Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt To: Alexandre Belloni Cc: Arnd Bergmann , Andy Shevchenko , Rasmus Villemoes , Greg Kroah-Hartman , Andrew Morton , Linux Kernel Mailing List , Alessandro Zummo , linux-rtc@vger.kernel.org, Bartlomiej Zolnierkiewicz , Dmitry Torokhov , Geert Uytterhoeven , Guan Xuetao , Ingo Molnar , Jason Wessel , Jonathan Corbet , Jonathan Hunter , Krzysztof Kozlowski , "Rafael J. Wysocki" , Thierry Reding Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1152 Lines: 31 On Thu, Jun 8, 2017 at 9:41 PM, Alexandre Belloni wrote: > On 08/06/2017 at 20:57:05 +0300, Andy Shevchenko wrote: >> On Thu, Jun 8, 2017 at 6:05 PM, Alexandre Belloni >> wrote: >> > I understand this may not fit your debugging needs but what about pretty >> > printing time64_t and using rtc_tm_to_time64? >> >> There are two downsides as I can see: >> 1) conversion to and from just for that; > > Those are almost all debug messages, I would be fine with that. Yeah, but the problem is to pass the reference. All dances around will uglify the code. (Obviously we can't pass timespec64/time64_t or anything longer than 32 bits as is in %p extension) >> 2) if you look closer to the patches rtc-* you may find cases where >> wday is also printed so, struct rtc_time still will be in use. > (And you missed two in rtc-mcp795.c). Honestly, nobody cares about wday, > you may as well leave it out. Oops, thanks, indeed. Okay, I will leave it for now with dropped wday until someone comes with strong opinion why it should be there. -- With Best Regards, Andy Shevchenko