lkml.org 
[lkml]   [2011]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] Trace: use unsigned long long in trace print frames
From
Date
On Fri, 2011-04-01 at 14:42 +0800, liubo wrote:
> While adding tracepoint for btrfs, I got a problem:
>
> btrfs uses some macros with "ULL" type, but tracepoint's macros,
> __print_[flags,symbols](), only have "unsigned long", so on 32bit box
> there will be 64->32 truncate WARNINGs when compiling.
>
> Here I'm inclined to make the replacement to clear those WARNINGs.

Hmm, I don't like this. unsigned long is a natural word for
architectures, I don't want to have 32 bit suffer because one user is
doing something with ULL.

A better solution is to add a trace_print_flags_u64 or something, that
can be used for cases that u64 is needed. For archs were sizeof(long) ==
sizeof(u64) we can have the two macros/structs be the same.

-- Steve




\
 
 \ /
  Last update: 2011-04-01 15:51    [W:0.117 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site