Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1661577

Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt

From Andy Shevchenko <andy.shevchenko@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt
Date 2017-06-08 20:50 +0200
Message-ID <tQaFj-7QA-1@gated-at.bofh.it> (permalink)
References (2 earlier) <tQ6V4-5vT-19@gated-at.bofh.it> <tQ74K-5AT-7@gated-at.bofh.it> <tQ7eq-5TV-11@gated-at.bofh.it> <tQ9SV-7ln-9@gated-at.bofh.it> <tQaFj-7QA-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 8, 2017 at 9:41 PM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> On 08/06/2017 at 20:57:05 +0300, Andy Shevchenko wrote:
>> On Thu, Jun 8, 2017 at 6:05 PM, Alexandre Belloni
>> <alexandre.belloni@free-electrons.com> 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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-08 15:50 +0200
  Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Arnd Bergmann <arnd@arndb.de> - 2017-06-08 16:50 +0200
    Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 17:00 +0200
      Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 17:10 +0200
        Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 20:00 +0200
          Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 20:50 +0200
            Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human readable format via %pt Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2017-06-08 22:50 +0200
              Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 23:30 +0200
                Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Arnd Bergmann <arnd@arndb.de> - 2017-06-08 23:50 +0200
          Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-08 20:50 +0200
      Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Arnd Bergmann <arnd@arndb.de> - 2017-06-08 17:40 +0200
        Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Joe Perches <joe@perches.com> - 2017-06-08 17:50 +0200
        Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-08 20:10 +0200
          Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human  readable format via %pt Joe Perches <joe@perches.com> - 2017-06-09 01:10 +0200

csiph-web