PM: Switch to use %ptR
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 4 Dec 2018 21:23:30 +0000 (23:23 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 10 Dec 2018 21:40:18 +0000 (22:40 +0100)
Use %ptR instead of open coded variant to print content of
struct rtc_time in human readable format.

Cc: linux-pm@vger.kernel.org
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/base/power/trace.c

index 1cda505..b11f47a 100644 (file)
@@ -118,9 +118,7 @@ static unsigned int read_magic_time(void)
        unsigned int val;
 
        mc146818_get_time(&time);
-       pr_info("RTC time: %2d:%02d:%02d, date: %02d/%02d/%02d\n",
-               time.tm_hour, time.tm_min, time.tm_sec,
-               time.tm_mon + 1, time.tm_mday, time.tm_year % 100);
+       pr_info("RTC time: %ptRt, date: %ptRd\n", &time, &time);
        val = time.tm_year;                             /* 100 years */
        if (val > 100)
                val -= 100;