diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-12-04 23:23:12 +0200 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-12-10 22:39:37 +0100 |
commit | 5548cbf7f148b9a039b19fa4697f1b9beaba2c78 (patch) | |
tree | d061de9fb7217922bb26d9c008729d26b0d6eb93 /drivers/rtc/interface.c | |
parent | 4d42c44727a062e233e446c6c86da1c84d762d79 (diff) |
rtc: Switch to use %ptR
Use %ptR instead of open coded variant to print content of
struct rtc_time in human readable format.
Note, we drop the validation option. This is only used in
a deprecated ABI and is mostly wrong as many RTCs will still be valid
after 2100.
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 612a83d3ddcc..e8d77b1eaeb2 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -368,12 +368,8 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm) err = rtc_valid_tm(&alarm->time); done: - if (err) { - dev_warn(&rtc->dev, "invalid alarm value: %d-%d-%d %d:%d:%d\n", - alarm->time.tm_year + 1900, alarm->time.tm_mon + 1, - alarm->time.tm_mday, alarm->time.tm_hour, alarm->time.tm_min, - alarm->time.tm_sec); - } + if (err) + dev_warn(&rtc->dev, "invalid alarm value: %ptR\n", &alarm->time); return err; } |