From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755640AbZCJNkL (ORCPT ); Tue, 10 Mar 2009 09:40:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754762AbZCJNj4 (ORCPT ); Tue, 10 Mar 2009 09:39:56 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:49862 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754963AbZCJNjz (ORCPT ); Tue, 10 Mar 2009 09:39:55 -0400 Date: Tue, 10 Mar 2009 09:39:52 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Andrew Morton cc: linux-kernel@vger.kernel.org, Ingo Molnar , Thomas Gleixner , Peter Zijlstra , Frederic Weisbecker , Theodore Tso , Arnaldo Carvalho de Melo , "H. Peter Anvin" , Mathieu Desnoyers , Lai Jiangshan , "Martin J. Bligh" , "Frank Ch. Eigler" , KOSAKI Motohiro , Larry Woodman , Jason Baron , Tom Zanussi , Masami Hiramatsu , Christoph Hellwig , Jiaying Zhang , Steven Rostedt Subject: Re: [PATCH 1/7] tracing: typecast sizeof and offsetof to unsigned int In-Reply-To: <20090309222033.d39c7b22.akpm@linux-foundation.org> Message-ID: References: <20090310045710.286915983@goodmis.org> <20090310045810.602528682@goodmis.org> <20090309222033.d39c7b22.akpm@linux-foundation.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Mar 2009, Andrew Morton wrote: > On Tue, 10 Mar 2009 00:57:11 -0400 Steven Rostedt wrote: > > > On x86_64 sizeof and offsetof are treated as long, where as on x86_32 > > they are int. This patch typecasts them to unsigned int to avoid > > one arch giving warnings while the other does not. > > Actually, both have type size_t. > > > static int trace_write_header(struct trace_seq *s) > > { > > @@ -457,11 +458,11 @@ static int trace_write_header(struct trace_seq *s) > > > > /* struct trace_entry */ > > return trace_seq_printf(s, > > - "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" > > - "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" > > - "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" > > - "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" > > - "\tfield:%s %s;\toffset:%lu;\tsize:%lu;\n" > > + "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" > > + "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" > > + "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" > > + "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" > > + "\tfield:%s %s;\toffset:%u;\tsize:%u;\n" > > Which may be printed with %z. That's new to me ;-) OK, I'll add a patch to my next series. Thanks, -- Steve