Re: [PATCH] trace: Make trace_hwlat timestamp y2038 safe

From: Steven Rostedt
Date: Mon Mar 27 2017 - 11:31:10 EST


On Mon, 27 Mar 2017 16:53:09 +0200
Arnd Bergmann <arnd@xxxxxxxx> wrote:


> > 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.
>
> size_t is always 'long', not 'long long'. We have %pad for dma_addr_t
> which may be 'long' or 'long long', but it is configuration dependent
> which one it is on 32-bit.

Ah your right. It was that it was defined as "int" on 32 and "long" on
64, and that caused problems with warnings when using "%d" when it was
defined as long.

>
> We could probably introduce a %pts format string for timespec64
> and have that pretty-printed.

Hmm, probably don't want a %p as that suggests its a pointer, which it
should not be. Unless we pass in the address of the number.

-- Steve