[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200421130938.GN185537@smile.fi.intel.com>
Date: Tue, 21 Apr 2020 16:09:38 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
Cc: Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
linux-kernel@...r.kernel.org,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3 2/3] ARM: bcm2835: Switch to use %ptT
On Thu, Apr 16, 2020 at 11:53:58AM +0900, Sergey Senozhatsky wrote:
> On (20/04/15 20:00), Andy Shevchenko wrote:
> [..]
> > diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
> > index da26a584dca0..a3e85186f8e6 100644
> > --- a/drivers/firmware/raspberrypi.c
> > +++ b/drivers/firmware/raspberrypi.c
> > @@ -182,16 +182,10 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
> > RPI_FIRMWARE_GET_FIRMWARE_REVISION,
> > &packet, sizeof(packet));
> >
> > - if (ret == 0) {
> > - struct tm tm;
> > -
> > - time64_to_tm(packet, 0, &tm);
> > + if (ret)
> > + return;
> >
> > - dev_info(fw->cl.dev,
> > - "Attached to firmware from %04ld-%02d-%02d %02d:%02d\n",
> > - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
> > - tm.tm_hour, tm.tm_min);
> > - }
> > + dev_info(fw->cl.dev, "Attached to firmware from %ptT\n", &packet);
> > }
>
> So can this be instead:
>
> struct rtc_time tm;
>
> rtc_time64_to_tm(time, &tm);
> dev_info(.... "%ptR", &tm);
>
> ?
>
> If it can, then I'd probably say something like "can we then just use
> rtc_time64_to_tm()"?
Same comment as per previous patch (TL;DR: no, it can't).
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists