From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408AbdC0O3E (ORCPT ); Mon, 27 Mar 2017 10:29:04 -0400 Received: from mail.kernel.org ([198.145.29.136]:35520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752059AbdC0O2z (ORCPT ); Mon, 27 Mar 2017 10:28:55 -0400 Date: Mon, 27 Mar 2017 10:28:45 -0400 From: Steven Rostedt To: Arnd Bergmann Cc: kbuild test robot , Deepa Dinamani , kbuild-all@01.org, Ingo Molnar , Linux Kernel Mailing List , y2038 Mailman List Subject: Re: [PATCH] trace: Make trace_hwlat timestamp y2038 safe Message-ID: <20170327102845.28708b5a@gandalf.local.home> In-Reply-To: References: <1490561829-15618-1-git-send-email-deepa.kernel@gmail.com> <201703271742.Qr4K4S8u%fengguang.wu@intel.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Mar 2017 11:55:52 +0200 Arnd Bergmann wrote: > On Mon, Mar 27, 2017 at 11:25 AM, kbuild test robot wrote: > > Hi Deepa, > > > > [auto build test WARNING on tip/perf/core] > > [also build test WARNING on v4.11-rc4 next-20170327] > > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > > > url: https://github.com/0day-ci/linux/commits/Deepa-Dinamani/trace-Make-trace_hwlat-timestamp-y2038-safe/20170327-150010 > > config: x86_64-randconfig-n0-03271517 (attached as .config) > > compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 > > reproduce: > > # save the attached .config to linux build tree > > make ARCH=x86_64 > > > > All warnings (new ones prefixed by >>): > > > > kernel/trace/trace_output.c: In function 'trace_hwlat_print': > >>> kernel/trace/trace_output.c:1168:5: warning: format '%lld' expects argument of type 'long long int', but argument 6 has type '__kernel_time_t' [-Wformat=] > > field->timestamp.tv_nsec); > > This happens on 64-bit architectures because 'struct timespec64' is defined to > be equal to 'struct timespec', which has a 'long' tv_sec rather than > 'long long'. > > A cast to 's64' is probably the best workaround. > > > kernel/trace/trace_output.c: In function 'trace_hwlat_raw': > > kernel/trace/trace_output.c:1202:5: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type '__kernel_time_t' [-Wformat=] > > field->seqnum); > > Same here. > Actually, I believe that "%zd" will work. It's made to work with size_t which is long long on 32 and long on 64. -- Steve