Skip to content

Commit

Permalink
ARM: bcm2835: Switch to use %ptT
Browse files Browse the repository at this point in the history
Use %ptT instead of open coded variant to print content of
time64_t type in human readable format.

Link: https://lore.kernel.org/r/20200415170046.33374-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Rewieved-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
  • Loading branch information
Andy Shevchenko authored and Petr Mladek committed May 20, 2020
1 parent 7daac5b commit 4a60f58
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/firmware/raspberrypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,10 @@ rpi_firmware_print_firmware_revision(struct rpi_firmware *fw)
RPI_FIRMWARE_GET_FIRMWARE_REVISION,
&packet, sizeof(packet));

if (ret == 0) {
struct tm tm;

time64_to_tm(packet, 0, &tm);
if (ret)
return;

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

static void
Expand Down

0 comments on commit 4a60f58

Please sign in to comment.