fs/namespace: fnic: Switch to use %ptTd
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 14 Mar 2023 15:09:06 +0000 (17:09 +0200)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Wed, 15 Mar 2023 07:55:32 +0000 (08:55 +0100)
Use %ptTd instead of open-coded variant to print contents
of time64_t type in human readable form.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/namespace.c

index bc0f152..a6e4c3a 100644 (file)
@@ -2617,15 +2617,12 @@ static void mnt_warn_timestamp_expiry(struct path *mountpoint, struct vfsmount *
           (ktime_get_real_seconds() + TIME_UPTIME_SEC_MAX > sb->s_time_max)) {
                char *buf = (char *)__get_free_page(GFP_KERNEL);
                char *mntpath = buf ? d_path(mountpoint, buf, PAGE_SIZE) : ERR_PTR(-ENOMEM);
-               struct tm tm;
 
-               time64_to_tm(sb->s_time_max, 0, &tm);
-
-               pr_warn("%s filesystem being %s at %s supports timestamps until %04ld (0x%llx)\n",
+               pr_warn("%s filesystem being %s at %s supports timestamps until %ptTd (0x%llx)\n",
                        sb->s_type->name,
                        is_mounted(mnt) ? "remounted" : "mounted",
-                       mntpath,
-                       tm.tm_year+1900, (unsigned long long)sb->s_time_max);
+                       mntpath, &sb->s_time_max,
+                       (unsigned long long)sb->s_time_max);
 
                free_page((unsigned long)buf);
                sb->s_iflags |= SB_I_TS_EXPIRY_WARNED;