Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3640688pxj; Tue, 11 May 2021 08:43:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXuc8OPYc21HOeTYMnfMtxd/WV+xcyqM+F5PzvrUBwIEcLOJmVNtqBB/yK9VeMMJGoCOUl X-Received: by 2002:a17:906:168d:: with SMTP id s13mr31506589ejd.81.1620747819426; Tue, 11 May 2021 08:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620747819; cv=none; d=google.com; s=arc-20160816; b=z5OMJOHXdZbRLbVWN2d3+8lyBsaRabijt4eImPVFuHlUapaXdpZAbVXJ5ifGdNi9gq U2Uq68/wj4TjsqXqD1jrbjLl7sLOeV1rD4bs3/srid9WgzB9U7/9ZWLR9a+y4AV9OQbM aE5ABCyzvaZjJcedIK2qi2BuOzqnKZCjZyM5Lc+SW6jtvY1koC3Khlbm6XgMt0fZ/nqM nDPJij8YFEtjUx9fCLI0hg0ryWFpi8TovY/OdmuDx6iGrQJMjPW3RkGd/0lFWWZ81q9j ojthwmveV/w64g678pbj9J8IaS0vXNCie7+/Js8ENIXBIPA/eyucikgMqiKEF5AK0ZiL qkyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=JUJz9ua0UCwm27hDGgm9Y4cqow//P5kgDv109NLO3T4=; b=p9tli6dGcGbx+op7cp+f0i++54cQop4St/dnxJ0lSKppibO9BNz2Uq/41c9b7QFPrw HGN6CtyUTwfjmtHEMusyJRLbneRNWE6HeyYtYW5/vaXcNksNnJMrHk7/vat3W+HWKMAL DfMHWMJ+3vb5W8KMnu4VCZ8nlEu4P//Fhbv4iJDR2hx+f6uU8/jLnSaRp6l1gCiMVHbM H9/xneVplb0+5VcD7S+oESRPSNi9gPbFz2B+CBDSkTLUoMFIIzy6SyriFl+7yXVZacnc Rsex2JiHa5Uddr2QEH540HGxyggk1WiP9IZczuSqPmXWu1EFLO3/nKpJAI1ML/+4ZJgM sOsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx6si15598687edb.419.2021.05.11.08.43.15; Tue, 11 May 2021 08:43:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231963AbhEKPlF (ORCPT + 99 others); Tue, 11 May 2021 11:41:05 -0400 Received: from mga06.intel.com ([134.134.136.31]:28260 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbhEKPk6 (ORCPT ); Tue, 11 May 2021 11:40:58 -0400 IronPort-SDR: QQ4Sjl5kMqyNo+51Lmncu1VMRud0Nm/Odk8kZGS/tADH8uo99J3m9ecc1+6vBCp7yiWgAv6m1W MSoAtVeU2pRQ== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="260734858" X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="260734858" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 08:39:45 -0700 IronPort-SDR: sLP3qUCam69dXxLCBSz/8ZlJdIgbpLY4sMvgUT0yRXe1Fga2ANFRGVLCfv7Gn7pm2jPjT5o8Bd Qrgqnd9cArVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,291,1613462400"; d="scan'208";a="434604792" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 11 May 2021 08:39:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 30C4093; 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 2/4] kdb: Switch to use %ptTs Date: Tue, 11 May 2021 18:39:56 +0300 Message-Id: <20210511153958.34527-2-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-kernel@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: Petr Mladek Reviewed-by: Douglas Anderson --- v2: collected tags 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)) { -- 2.30.2