aboutsummaryrefslogtreecommitdiff
path: root/kernel/debug
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2021-05-11 18:39:56 +0300
committerPetr Mladek <[email protected]>2021-05-17 12:01:35 +0200
commit126ac4d67d97fdeef52b6249702266eb94a05d9e (patch)
treed7ca303f7a592babacb0773562d3cf0ef9845e66 /kernel/debug
parent20bc8c1e972f29afcac85e524e430c11a6df5f58 (diff)
kdb: Switch to use %ptTs
Use %ptTs instead of open-coded variant to print contents of time64_t type in human readable form. Cc: Jason Wessel <[email protected]> Cc: Daniel Thompson <[email protected]> Cc: [email protected] Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Reviewed-by: Daniel Thompson <[email protected]> Acked-by: Daniel Thompson <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'kernel/debug')
-rw-r--r--kernel/debug/kdb/kdb_main.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 1baa96a2ecb8..622410c45da1 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -2488,7 +2488,6 @@ static void kdb_sysinfo(struct sysinfo *val)
static int kdb_summary(int argc, const char **argv)
{
time64_t now;
- struct tm tm;
struct sysinfo val;
if (argc)
@@ -2502,13 +2501,7 @@ static int kdb_summary(int argc, const char **argv)
kdb_printf("domainname %s\n", init_uts_ns.name.domainname);
now = __ktime_get_real_seconds();
- time64_to_tm(now, 0, &tm);
- kdb_printf("date %04ld-%02d-%02d %02d:%02d:%02d "
- "tz_minuteswest %d\n",
- 1900+tm.tm_year, tm.tm_mon+1, tm.tm_mday,
- tm.tm_hour, tm.tm_min, tm.tm_sec,
- sys_tz.tz_minuteswest);
-
+ kdb_printf("date %ptTs tz_minuteswest %d\n", &now, sys_tz.tz_minuteswest);
kdb_sysinfo(&val);
kdb_printf("uptime ");
if (val.uptime > (24*60*60)) {