[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1519219174.10722.21.camel@linux.intel.com>
Date: Wed, 21 Feb 2018 15:19:34 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Joe Perches <joe@...ches.com>,
Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
linux-rtc@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Mark Salyzyn <salyzyn@...roid.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Guan Xuetao <gxt@...c.pku.edu.cn>,
Ingo Molnar <mingo@...nel.org>,
Jason Wessel <jason.wessel@...driver.com>,
Jonathan Corbet <corbet@....net>,
Jonathan Hunter <jonathanh@...dia.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH v2 01/21] lib/vsprintf: Print time and date in human
readable format via %pt
On Tue, 2018-02-20 at 15:55 -0800, Joe Perches wrote:
> On Tue, 2018-02-20 at 23:43 +0200, Andy Shevchenko wrote:
> > There are users which print time and date represented by content of
> > struct rtc_time in human readable format.
> >
> > Instead of open coding that each time introduce %ptR[dt][rv]
> > specifier.
> >
> > Note, users have to select PRINTK_PEXT_TIMEDATE option in a Kconfig.
>
> Not sure this is a great option.
> Not just the name, the need to select it.
kbuildbot and some people complained about + text size.
https://lists.01.org/pipermail/kbuild-all/2017-June/034950.html
I would really like to compile it always.
> > + int year = tm->tm_year + (r ? 0 : 1900);
> > + int mon = tm->tm_mon + (r ? 0 : 1);
>
> What happens with negative values?
Same as before.
> Perhaps these temporaries should be unsigned int.
No, the type of them is int, so, I'll keep it int.
> > + if (unlikely(v && (unsigned int)tm->tm_min > 59))
>
> leap seconds are allowed in the struct
Alexandre answered already, but I would add that this is part of
existing ABI, so, I wouldn't go to change this.
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists