* [PATCH v3 20/20] PM: Switch to use %ptR
[not found] <20181113171729.19645-1-andriy.shevchenko@linux.intel.com>
@ 2018-11-13 17:17 ` Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2018-11-13 17:17 UTC (permalink / raw)
To: Rasmus Villemoes, Greg Kroah-Hartman, linux-kernel,
Alessandro Zummo, Alexandre Belloni, linux-rtc, Arnd Bergmann,
Joe Perches, Mark Salyzyn, Geert Uytterhoeven
Cc: Andy Shevchenko, linux-pm
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>
---
drivers/base/power/trace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c
index 1cda505d6a85..b11f47a1e819 100644
--- a/drivers/base/power/trace.c
+++ b/drivers/base/power/trace.c
@@ -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;
--
2.19.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-13 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20181113171729.19645-1-andriy.shevchenko@linux.intel.com>
2018-11-13 17:17 ` [PATCH v3 20/20] PM: Switch to use %ptR Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).