summaryrefslogtreecommitdiff
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-09-14 13:31:35 (GMT)
committerSteven Rostedt <rostedt@goodmis.org>2009-09-14 13:41:57 (GMT)
commit08a408161749d2406f94f4e3d47cfdbc826ad1cc (patch)
tree6132140fe47c4825159dda8f8f438ac8baae6055 /kernel/trace/trace.h
parent60ba77022712c7cda0eda286154bae160446b24a (diff)
downloadlinux-08a408161749d2406f94f4e3d47cfdbc826ad1cc.tar.xz
ring-buffer: typecast cmpxchg to fix PowerPC warning
The cmpxchg used by PowerPC does the following: ({ \ __typeof__(*(ptr)) _o_ = (o); \ __typeof__(*(ptr)) _n_ = (n); \ (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ (unsigned long)_n_, sizeof(*(ptr))); \ }) This does a type check of *ptr to both o and n. Unfortunately, the code in ring-buffer.c assigns longs to pointers and pointers to longs and causes a warning on PowerPC: ring_buffer.c: In function 'rb_head_page_set': ring_buffer.c:704: warning: initialization makes pointer from integer without a cast ring_buffer.c:704: warning: initialization makes pointer from integer without a cast ring_buffer.c: In function 'rb_head_page_replace': ring_buffer.c:797: warning: initialization makes integer from pointer without a cast This patch adds the typecasts inside cmpxchg to annotate that a long is being cast to a pointer and a pointer is being casted to a long and this removes the PowerPC warnings. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
0 files changed, 0 insertions, 0 deletions