[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170327102845.28708b5a@gandalf.local.home>
Date: Mon, 27 Mar 2017 10:28:45 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: kbuild test robot <lkp@...el.com>,
Deepa Dinamani <deepa.kernel@...il.com>, kbuild-all@...org,
Ingo Molnar <mingo@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
y2038 Mailman List <y2038@...ts.linaro.org>
Subject: Re: [PATCH] trace: Make trace_hwlat timestamp y2038 safe
On Mon, 27 Mar 2017 11:55:52 +0200
Arnd Bergmann <arnd@...db.de> wrote:
> On Mon, Mar 27, 2017 at 11:25 AM, kbuild test robot <lkp@...el.com> 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
Powered by blists - more mailing lists