From mboxrd@z Thu Jan 1 00:00:00 1970 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,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 53DC7C433ED for ; Tue, 11 May 2021 15:39:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10608616EA for ; Tue, 11 May 2021 15:39:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231761AbhEKPkx (ORCPT ); Tue, 11 May 2021 11:40:53 -0400 Received: from mga01.intel.com ([192.55.52.88]:7459 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231609AbhEKPkx (ORCPT ); Tue, 11 May 2021 11:40:53 -0400 IronPort-SDR: jeBFSRI0bkMXc5yh/osi/PRbTUGaBGcZ3d4dB/M9tOzj1rxkwu4Z7f4Kr9XLNj6VY0WokeZ7HY 5yj3vK84iuDQ== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="220433998" X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="220433998" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 08:39:45 -0700 IronPort-SDR: H0wVXfxBhyMTLxPORoRiL0GnwHWcL0KfaEQ+ZRG155yFSNIbKZcSiYONnGFdlcZEH261hShfCJ HoA0Aa/0BeHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="537074076" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 11 May 2021 08:39:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4EF67338; Tue, 11 May 2021 18:40:01 +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 v2 4/4] usb: host: xhci-tegra: Switch to use %ptTs Date: Tue, 11 May 2021 18:39:58 +0300 Message-Id: <20210511153958.34527-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210511153958.34527-1-andriy.shevchenko@linux.intel.com> References: <20210511153958.34527-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-tegra@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 Reviewed-by: Petr Mladek --- v2: collected tags 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; } -- 2.30.2 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: [PATCH v2 4/4] usb: host: xhci-tegra: Switch to use %ptTs Date: Tue, 11 May 2021 18:39:58 +0300 Message-ID: <20210511153958.34527-4-andriy.shevchenko@linux.intel.com> References: <20210511153958.34527-1-andriy.shevchenko@linux.intel.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20210511153958.34527-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" To: Petr Mladek , JC Kuo , Joe Perches , Sumit Garg , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kgdb-bugreport-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 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 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 Reviewed-by: Petr Mladek --- v2: collected tags 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; } -- 2.30.2