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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 1B303C352AA for ; Tue, 1 Oct 2019 11:56:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E506D21924 for ; Tue, 1 Oct 2019 11:56:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387535AbfJAL4o (ORCPT ); Tue, 1 Oct 2019 07:56:44 -0400 Received: from mga06.intel.com ([134.134.136.31]:10152 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbfJAL4o (ORCPT ); Tue, 1 Oct 2019 07:56:44 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2019 04:56:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,571,1559545200"; d="scan'208";a="195622861" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga006.jf.intel.com with ESMTP; 01 Oct 2019 04:56:41 -0700 Received: from andy by smile with local (Exim 4.92.2) (envelope-from ) id 1iFGlk-0008LP-FA; Tue, 01 Oct 2019 14:56:40 +0300 Date: Tue, 1 Oct 2019 14:56:40 +0300 From: Andy Shevchenko To: Petr Mladek , linux-kernel@vger.kernel.org, Greg Kroah-Hartman Cc: Mathias Nyman , Thierry Reding , Jonathan Hunter Subject: Re: [PATCH v1 4/4] usb: host: xhci-tegra: Switch to use %ptT Message-ID: <20191001115640.GJ32742@smile.fi.intel.com> References: <20190104193009.30907-1-andriy.shevchenko@linux.intel.com> <20190104193009.30907-4-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190104193009.30907-4-andriy.shevchenko@linux.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 04, 2019 at 09:30:09PM +0200, Andy Shevchenko wrote: > Use %ptT instead of open coded variant to print content of > time64_t type in human readable format. Any comments on this? > > Cc: Mathias Nyman > 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 938ff06c0349..ed3eea3876e2 100644 > --- a/drivers/usb/host/xhci-tegra.c > +++ b/drivers/usb/host/xhci-tegra.c > @@ -820,7 +820,6 @@ static int tegra_xusb_load_firmware(struct tegra_xusb *tegra) > const struct firmware *fw; > unsigned long timeout; > time64_t timestamp; > - struct tm time; > u64 address; > u32 value; > int err; > @@ -925,11 +924,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: %ptT UTC\n", ×tamp); > > return 0; > } > -- > 2.19.2 > -- With Best Regards, Andy Shevchenko