From patchwork Fri Jun 17 15:30:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102155 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp341053qgy; Fri, 17 Jun 2016 08:29:28 -0700 (PDT) X-Received: by 10.107.142.215 with SMTP id q206mr4107161iod.178.1466177368857; Fri, 17 Jun 2016 08:29:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qo2si6781458pac.162.2016.06.17.08.29.28; Fri, 17 Jun 2016 08:29:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932504AbcFQP3V (ORCPT + 30 others); Fri, 17 Jun 2016 11:29:21 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:59234 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbcFQP3R (ORCPT ); Fri, 17 Jun 2016 11:29:17 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0Le9EG-1bjzHb2zmu-00pvhH; Fri, 17 Jun 2016 17:29:07 +0200 From: Arnd Bergmann To: Thomas Gleixner , John Stultz Cc: y2038@lists.linaro.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] timer: avoid using timespec Date: Fri, 17 Jun 2016 17:30:47 +0200 Message-Id: <20160617153056.344585-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:ZldalMYbJqec6rEJxNgN/J7bSxUfkZCFSTW7eC6Gp2U+yc+mCdm gpeoz1bp9wfitpezGd9bSfaMOdaPNCVFR1CO7NK4xVtYUTP6how20V7p85Zgk9O5ixq21nG 15bNDuKH9J0BIT47WLPuEaV3RqJrUpYCV1GfUXnTK3noabTpzrDqFpHi0Tr0vAT9QaiZ7LP aVvcn1JmnQfAi4x43DQTQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:bWmSI535rk0=:52n5S9jDTUPD8yOpFdEvUn Xt79nFLrD2dkieANnmYei8aNdki8t8Cah06yyN8saZ0K5GKwvoBj4xsABhLdEvFHQ1WtZGaZQ /YgyXVT80wSlUSLq+AnuNSqoym8RmnyRo+P5adsGKDIOcxveHUOFDCGTIC8AXXrUeECvE0pCX vfxEjYKvqsHpZcRvIewANoH5B8EqaNR09u2eDoKf8MwqTVwBBRlGzTeVYD9+bxKOdjOtZIHUg 6eKccgXcVuJYLa9xAoQcx6z98siE9SC1hOFmHIesMDkL1oOaOJuCDnAMEk/9ptcqd0KtXvR1P TT3JgmSBEGyC12xoSuGb06mG57lgZBB9CjO9GoAIybwvA+jixhyRtvCNZIx/lVsIiHN8Y/aZN K43Orca1PaYCkM7iJYTFoBwIcnflSsciD/JA2D91w6quQj5+75ycxVY2HnzLkY9SYYzmEl5bc YCtPumqJe1kv0Bm1dmfH9ONb2juDl3iDfSYlhX58Mwke1tsfD8YESWe0x3i2KkMEFdGK0VVvw vr+ZHjAVWwfESWPsffgPOS2368LbPw24Lyx04k5K+M5ay4P09fVWodtnT1aaPZ/4V64t8KdtT KwO3oCcOh24w7ARA5z7RJTNQzBf0foYZJ1HMuPiGm1WkhlUK/O3ZVSsG4GNCTInM9P1JWMcML c19eMzuVVOHxH02Qb15EXastWTp+VkpM8k5AgqLqUQ5at3gQFUejCtM+xbf429TuiLgY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The tstats_show() function prints a ktime_t variable by converting it to struct timespec first. The algorithm is ok, but we want to stop using timespec in general because of the 32-bit time_t overflow problem. This changes the code to use struct timespec64, without any functional change. Signed-off-by: Arnd Bergmann --- kernel/time/timer_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 1adecb4b87c8..087204c733eb 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c @@ -279,7 +279,7 @@ static void print_name_offset(struct seq_file *m, unsigned long addr) static int tstats_show(struct seq_file *m, void *v) { - struct timespec period; + struct timespec64 period; struct entry *entry; unsigned long ms; long events = 0; @@ -295,11 +295,11 @@ static int tstats_show(struct seq_file *m, void *v) time = ktime_sub(time_stop, time_start); - period = ktime_to_timespec(time); + period = ktime_to_timespec64(time); ms = period.tv_nsec / 1000000; seq_puts(m, "Timer Stats Version: v0.3\n"); - seq_printf(m, "Sample period: %ld.%03ld s\n", period.tv_sec, ms); + seq_printf(m, "Sample period: %ld.%03ld s\n", (long)period.tv_sec, ms); if (atomic_read(&overflow_count)) seq_printf(m, "Overflow: %d entries\n", atomic_read(&overflow_count)); seq_printf(m, "Collection: %s\n", timer_stats_active ? "active" : "inactive");