diff options
| author | Andy Shevchenko <[email protected]> | 2018-12-04 21:23:12 +0000 |
|---|---|---|
| committer | Alexandre Belloni <[email protected]> | 2018-12-10 21:39:37 +0000 |
| commit | 5548cbf7f148b9a039b19fa4697f1b9beaba2c78 (patch) | |
| tree | d061de9fb7217922bb26d9c008729d26b0d6eb93 /drivers/rtc/interface.c | |
| parent | lib/vsprintf: Print time and date in human readable format via %pt (diff) | |
| download | kernel-5548cbf7f148b9a039b19fa4697f1b9beaba2c78.tar.gz kernel-5548cbf7f148b9a039b19fa4697f1b9beaba2c78.zip | |
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 <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
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; } |
