Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rtc: tegra: Switch to use %ptR

Use %ptR instead of open coded variant to print content of
struct rtc_time in human readable format.

Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Andy Shevchenko and committed by
Alexandre Belloni
d54fb486 5527842e

+3 -27
+3 -27
drivers/rtc/rtc-tegra.c
··· 125 125 126 126 rtc_time_to_tm(sec, tm); 127 127 128 - dev_vdbg(dev, "time read as %lu. %d/%d/%d %d:%02u:%02u\n", 129 - sec, 130 - tm->tm_mon + 1, 131 - tm->tm_mday, 132 - tm->tm_year + 1900, 133 - tm->tm_hour, 134 - tm->tm_min, 135 - tm->tm_sec 136 - ); 128 + dev_vdbg(dev, "time read as %lu. %ptR\n", sec, tm); 137 129 138 130 return 0; 139 131 } ··· 139 147 /* convert tm to seconds. */ 140 148 rtc_tm_to_time(tm, &sec); 141 149 142 - dev_vdbg(dev, "time set to %lu. %d/%d/%d %d:%02u:%02u\n", 143 - sec, 144 - tm->tm_mon+1, 145 - tm->tm_mday, 146 - tm->tm_year+1900, 147 - tm->tm_hour, 148 - tm->tm_min, 149 - tm->tm_sec 150 - ); 150 + dev_vdbg(dev, "time set to %lu. %ptR\n", sec, tm); 151 151 152 152 /* seconds only written if wait succeeded. */ 153 153 ret = tegra_rtc_wait_while_busy(dev); ··· 216 232 /* if successfully written and alarm is enabled ... */ 217 233 if (sec) { 218 234 tegra_rtc_alarm_irq_enable(dev, 1); 219 - 220 - dev_vdbg(dev, "alarm set as %lu. %d/%d/%d %d:%02u:%02u\n", 221 - sec, 222 - alarm->time.tm_mon+1, 223 - alarm->time.tm_mday, 224 - alarm->time.tm_year+1900, 225 - alarm->time.tm_hour, 226 - alarm->time.tm_min, 227 - alarm->time.tm_sec); 235 + dev_vdbg(dev, "alarm set as %lu. %ptR\n", sec, &alarm->time); 228 236 } else { 229 237 /* disable alarm if 0 or write error. */ 230 238 dev_vdbg(dev, "alarm disabled\n");