Skip to content

Commit 4a60f58

Browse files
andy-shevpmladek
authored andcommitted
ARM: bcm2835: Switch to use %ptT
Use %ptT instead of open coded variant to print content of time64_t type in human readable format. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Sergey Senozhatsky <[email protected]> Rewieved-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]>
1 parent 7daac5b commit 4a60f58

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/firmware/raspberrypi.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,10 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
182182
RPI_FIRMWARE_GET_FIRMWARE_REVISION,
183183
&packet, sizeof(packet));
184184

185-
if (ret == 0) {
186-
struct tm tm;
187-
188-
time64_to_tm(packet, 0, &tm);
185+
if (ret)
186+
return;
189187

190-
dev_info(fw->cl.dev,
191-
"Attached to firmware from %04ld-%02d-%02d %02d:%02d\n",
192-
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
193-
tm.tm_hour, tm.tm_min);
194-
}
188+
dev_info(fw->cl.dev, "Attached to firmware from %ptT\n", &packet);
195189
}
196190

197191
static void

0 commit comments

Comments
 (0)