From patchwork Mon May 10 15:04:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 433437 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9D26C43611 for ; Mon, 10 May 2021 15:05:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C88BA61421 for ; Mon, 10 May 2021 15:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241978AbhEJPGw (ORCPT ); Mon, 10 May 2021 11:06:52 -0400 Received: from mga03.intel.com ([134.134.136.65]:19307 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235904AbhEJPFc (ORCPT ); Mon, 10 May 2021 11:05:32 -0400 IronPort-SDR: muOn85VgRPyPHUb7+/qNvE635H04T4YfW5X0gUs7bCf5FyiHqjmF3CsrGlaUrpInZdoUxsaKnF O+WvJjHLtBGA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199266433" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="199266433" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 08:04:27 -0700 IronPort-SDR: 5HtizJ1vAOQZfmDWuujDPkjkF4zn0yMx9a+JK8MEiXghp0HskM5L/WkqyoCEer5wcgyVmNat77 67u0ynZXBGMg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="470818104" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 10 May 2021 08:03:57 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6A7D812A; Mon, 10 May 2021 18:04:16 +0300 (EEST) From: Andy Shevchenko To: Petr Mladek , JC Kuo , Joe Perches , Sumit Garg , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-nilfs@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net Cc: Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Mathias Nyman , Greg Kroah-Hartman , Thierry Reding , Jonathan Hunter , Ryusuke Konishi , Jason Wessel , Daniel Thompson , Douglas Anderson Subject: [PATCH v1 1/4] lib/vsprintf: Allow to override date and time separator Date: Mon, 10 May 2021 18:04:10 +0300 Message-Id: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org ISO 8601 defines 'T' as a separator between date and time. Though, some ABIs use time and date with ' ' separator instead. Add a flavour to the %pt specifier to override default separator. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Reviewed-by: Petr Mladek --- Documentation/core-api/printk-formats.rst | 6 +++++- lib/test_printf.c | 5 +++++ lib/vsprintf.c | 19 ++++++++++++++++--- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst index f063a384c7c8..bc85fd4685e7 100644 --- a/Documentation/core-api/printk-formats.rst +++ b/Documentation/core-api/printk-formats.rst @@ -514,9 +514,10 @@ Time and date :: %pt[RT] YYYY-mm-ddTHH:MM:SS + %pt[RT]s YYYY-mm-dd HH:MM:SS %pt[RT]d YYYY-mm-dd %pt[RT]t HH:MM:SS - %pt[RT][dt][r] + %pt[RT][dt][rs] For printing date and time as represented by:: @@ -528,6 +529,9 @@ in human readable format. By default year will be incremented by 1900 and month by 1. Use %pt[RT]r (raw) to suppress this behaviour. +The %pt[RT]s (space) will override ISO 8601 by using ' ' instead of 'T' +between date and time. It won't have any effect when date or time is omitted. + Passed by reference. struct clk diff --git a/lib/test_printf.c b/lib/test_printf.c index ec0d5976bb69..8ac71aee46af 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -528,6 +528,11 @@ time_and_date(void) test("0119-00-04T15:32:23", "%ptTr", &t); test("15:32:23|2019-01-04", "%ptTt|%ptTd", &t, &t); test("15:32:23|0119-00-04", "%ptTtr|%ptTdr", &t, &t); + + test("2019-01-04 15:32:23", "%ptTs", &t); + test("0119-00-04 15:32:23", "%ptTsr", &t); + test("15:32:23|2019-01-04", "%ptTts|%ptTds", &t, &t); + test("15:32:23|0119-00-04", "%ptTtrs|%ptTdrs", &t, &t); } static void __init diff --git a/lib/vsprintf.c b/lib/vsprintf.c index f0c35d9b65bf..5f36c7a43cdc 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1834,7 +1834,8 @@ char *rtc_str(char *buf, char *end, const struct rtc_time *tm, struct printf_spec spec, const char *fmt) { bool have_t = true, have_d = true; - bool raw = false; + bool raw = false, space = false; + bool found = true; int count = 2; if (check_pointer(&buf, end, tm, spec)) @@ -1851,14 +1852,26 @@ char *rtc_str(char *buf, char *end, const struct rtc_time *tm, break; } - raw = fmt[count] == 'r'; + do { + switch (fmt[count++]) { + case 'r': + raw = true; + break; + case 's': + space = true; + break; + default: + found = false; + break; + } + } while (found); if (have_d) buf = date_str(buf, end, tm, raw); if (have_d && have_t) { /* Respect ISO 8601 */ if (buf < end) - *buf = 'T'; + *buf = space ? ' ' : 'T'; buf++; } if (have_t) From patchwork Mon May 10 15:04:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 434682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7627C43460 for ; Mon, 10 May 2021 15:05:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8AF8861481 for ; Mon, 10 May 2021 15:05:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240898AbhEJPGq (ORCPT ); Mon, 10 May 2021 11:06:46 -0400 Received: from mga03.intel.com ([134.134.136.65]:19251 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235007AbhEJPFI (ORCPT ); Mon, 10 May 2021 11:05:08 -0400 IronPort-SDR: egPS5qznSNDhObjvz9Lo89HVkplex6iVr0AsiKH2Odym4yA+fYEqVMCinVZvVNCb4pgluE1hiI uOjztmTXJFHA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199266334" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="199266334" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 08:04:01 -0700 IronPort-SDR: AJdgKEvFkR6LVFQAOb+kyPg6KA1RN5I0Wrszn6j4A5d+9D8OTc7WPxmPH56SnIBOYaUFJmfdlq 4zOMaM+sZ2VQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="609132501" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 10 May 2021 08:03:56 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 741EE142; Mon, 10 May 2021 18:04:16 +0300 (EEST) From: Andy Shevchenko To: Petr Mladek , JC Kuo , Joe Perches , Sumit Garg , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-nilfs@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net Cc: Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Mathias Nyman , Greg Kroah-Hartman , Thierry Reding , Jonathan Hunter , Ryusuke Konishi , Jason Wessel , Daniel Thompson , Douglas Anderson Subject: [PATCH v1 2/4] kdb: Switch to use %ptTs Date: Mon, 10 May 2021 18:04:11 +0300 Message-Id: <20210510150413.59356-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> References: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use %ptTs instead of open-coded variant to print contents of time64_t type in human readable form. Cc: Jason Wessel Cc: Daniel Thompson Cc: kgdb-bugreport@lists.sourceforge.net Signed-off-by: Andy Shevchenko Reviewed-by: Douglas Anderson --- kernel/debug/kdb/kdb_main.c | 9 +-------- 1 file changed, 1 insertion(+), 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)) { From patchwork Mon May 10 15:04:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 433438 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52E11C43462 for ; Mon, 10 May 2021 15:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 332A06147F for ; Mon, 10 May 2021 15:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241191AbhEJPGr (ORCPT ); Mon, 10 May 2021 11:06:47 -0400 Received: from mga14.intel.com ([192.55.52.115]:14230 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235028AbhEJPFI (ORCPT ); Mon, 10 May 2021 11:05:08 -0400 IronPort-SDR: UkIR35QGWofuJcJeYhRLNNtJRi+8sxk/IFoNHA10RBAN79Tq146G/9krR6IlY5hy5mDK69CexA QxLdtzZ0HcIA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="198891287" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="198891287" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 08:04:01 -0700 IronPort-SDR: vtCioZJlQQudEsVBPUFAdiRcXz8hr8ByH7nkY/1QzNUsTgRdwzS673eAs+6b+hMtXD267On8EP QquePXuHOn1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="536448298" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 10 May 2021 08:03:56 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7EA3F147; Mon, 10 May 2021 18:04:16 +0300 (EEST) From: Andy Shevchenko To: Petr Mladek , JC Kuo , Joe Perches , Sumit Garg , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-nilfs@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net Cc: Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Mathias Nyman , Greg Kroah-Hartman , Thierry Reding , Jonathan Hunter , Ryusuke Konishi , Jason Wessel , Daniel Thompson , Douglas Anderson Subject: [PATCH v1 3/4] nilfs2: Switch to use %ptTs Date: Mon, 10 May 2021 18:04:12 +0300 Message-Id: <20210510150413.59356-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> References: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use %ptTs instead of open coded variant to print contents of time64_t type in human readable form. Use sysfs_emit() at the same time in the changed functions. Cc: Ryusuke Konishi Cc: linux-nilfs@vger.kernel.org Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek --- fs/nilfs2/sysfs.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c index 303d71430bdd..4e10423f0448 100644 --- a/fs/nilfs2/sysfs.c +++ b/fs/nilfs2/sysfs.c @@ -19,19 +19,6 @@ /* /sys/fs// */ static struct kset *nilfs_kset; -#define NILFS_SHOW_TIME(time_t_val, buf) ({ \ - struct tm res; \ - int count = 0; \ - time64_to_tm(time_t_val, 0, &res); \ - res.tm_year += 1900; \ - res.tm_mon += 1; \ - count = scnprintf(buf, PAGE_SIZE, \ - "%ld-%.2d-%.2d %.2d:%.2d:%.2d\n", \ - res.tm_year, res.tm_mon, res.tm_mday, \ - res.tm_hour, res.tm_min, res.tm_sec);\ - count; \ -}) - #define NILFS_DEV_INT_GROUP_OPS(name, parent_name) \ static ssize_t nilfs_##name##_attr_show(struct kobject *kobj, \ struct attribute *attr, char *buf) \ @@ -576,7 +563,7 @@ nilfs_segctor_last_seg_write_time_show(struct nilfs_segctor_attr *attr, ctime = nilfs->ns_ctime; up_read(&nilfs->ns_segctor_sem); - return NILFS_SHOW_TIME(ctime, buf); + return sysfs_emit(buf, "%ptTs\n", &ctime); } static ssize_t @@ -604,7 +591,7 @@ nilfs_segctor_last_nongc_write_time_show(struct nilfs_segctor_attr *attr, nongc_ctime = nilfs->ns_nongc_ctime; up_read(&nilfs->ns_segctor_sem); - return NILFS_SHOW_TIME(nongc_ctime, buf); + return sysfs_emit(buf, "%ptTs\n", &nongc_ctime); } static ssize_t @@ -724,7 +711,7 @@ nilfs_superblock_sb_write_time_show(struct nilfs_superblock_attr *attr, sbwtime = nilfs->ns_sbwtime; up_read(&nilfs->ns_sem); - return NILFS_SHOW_TIME(sbwtime, buf); + return sysfs_emit(buf, "%ptTs\n", &sbwtime); } static ssize_t From patchwork Mon May 10 15:04:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 434681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 713E9C43600 for ; Mon, 10 May 2021 15:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 493C361481 for ; Mon, 10 May 2021 15:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241550AbhEJPGt (ORCPT ); Mon, 10 May 2021 11:06:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:18899 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235326AbhEJPFY (ORCPT ); Mon, 10 May 2021 11:05:24 -0400 IronPort-SDR: 3d5S3Swa/9p9Ugalhr8YwapLF6TJL2CYMzXfJm9s3KELeX4eI2GRlLMRMZUDR0Vs+43a0oG97Y u1ObvhnBRwSQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199266347" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="199266347" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 08:04:02 -0700 IronPort-SDR: IOjie96ZhmgBakkWhU2dJA996iOyKlZJgdodqHtw3Qv0We3mF69WZ562+YavWqrvP7cHA1djcp KCtcD6gLXJ3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="468259165" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 10 May 2021 08:03:56 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 88ECF1D2; Mon, 10 May 2021 18:04:16 +0300 (EEST) From: Andy Shevchenko To: Petr Mladek , JC Kuo , Joe Perches , Sumit Garg , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-nilfs@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net Cc: Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Mathias Nyman , Greg Kroah-Hartman , Thierry Reding , Jonathan Hunter , Ryusuke Konishi , Jason Wessel , Daniel Thompson , Douglas Anderson Subject: [PATCH v1 4/4] usb: host: xhci-tegra: Switch to use %ptTs Date: Mon, 10 May 2021 18:04:13 +0300 Message-Id: <20210510150413.59356-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> References: <20210510150413.59356-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Use %ptTs instead of open coded variant to print contents of time64_t type in human readable form. Cc: Thierry Reding Cc: Jonathan Hunter Signed-off-by: Andy Shevchenko --- drivers/usb/host/xhci-tegra.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c index ce97ff054c68..937b78cba89b 100644 --- a/drivers/usb/host/xhci-tegra.c +++ b/drivers/usb/host/xhci-tegra.c @@ -890,7 +890,6 @@ static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) struct xhci_op_regs __iomem *op; unsigned long timeout; time64_t timestamp; - struct tm time; u64 address; u32 value; int err; @@ -987,11 +986,8 @@ static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) } timestamp = le32_to_cpu(header->fwimg_created_time); - time64_to_tm(timestamp, 0, &time); - dev_info(dev, "Firmware timestamp: %ld-%02d-%02d %02d:%02d:%02d UTC\n", - time.tm_year + 1900, time.tm_mon + 1, time.tm_mday, - time.tm_hour, time.tm_min, time.tm_sec); + dev_info(dev, "Firmware timestamp: %ptTs UTC\n", ×tamp); return 0; }