Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1661295
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v1 10/25] rtc: m48t59: Switch to use %pt |
| Date | 2017-06-08 16:10 +0200 |
| Message-ID | <tQ6im-5iV-35@gated-at.bofh.it> (permalink) |
| References | <tQ5Z1-4WL-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use %pt instead of open coded variant to print content of struct rtc_time in human readable format. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/rtc/rtc-m48t59.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index d99a705bec07..1583584becb8 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -102,9 +102,7 @@ static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) M48T59_CLEAR_BITS(M48T59_CNTL_READ, M48T59_CNTL); spin_unlock_irqrestore(&m48t59->lock, flags); - dev_dbg(dev, "RTC read time %04d-%02d-%02d %02d/%02d/%02d\n", - tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); + dev_dbg(dev, "RTC read time %pt\n", tm); return rtc_valid_tm(tm); } @@ -193,9 +191,7 @@ static int m48t59_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) M48T59_CLEAR_BITS(M48T59_CNTL_READ, M48T59_CNTL); spin_unlock_irqrestore(&m48t59->lock, flags); - dev_dbg(dev, "RTC read alarm time %04d-%02d-%02d %02d/%02d/%02d\n", - tm->tm_year + 1900, tm->tm_mon, tm->tm_mday, - tm->tm_hour, tm->tm_min, tm->tm_sec); + dev_dbg(dev, "RTC read alarm time %pt\n", tm); return rtc_valid_tm(tm); } -- 2.11.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v1 10/25] rtc: m48t59: Switch to use %pt Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-06-08 16:10 +0200
csiph-web