From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756875AbZHRAG1 (ORCPT ); Mon, 17 Aug 2009 20:06:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752122AbZHRAG0 (ORCPT ); Mon, 17 Aug 2009 20:06:26 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:40149 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751793AbZHRAG0 (ORCPT ); Mon, 17 Aug 2009 20:06:26 -0400 Date: Mon, 17 Aug 2009 20:06:24 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Frederic Weisbecker cc: Jason Baron , linux-kernel@vger.kernel.org, mingo@elte.hu, laijs@cn.fujitsu.com, peterz@infradead.org, mathieu.desnoyers@polymtl.ca, jiayingz@google.com, mbligh@google.com, lizf@cn.fujitsu.com Subject: Re: [PATCH 07/12] add ftrace_event_call void * 'data' field In-Reply-To: <20090817230926.GC4962@nowhere> Message-ID: References: <2f63f892c862efd4f58f9d3e72cb5bc55f2d0025.1249932670.git.jbaron@redhat.com> <20090811100904.GA4938@nowhere> <20090817230926.GC4962@nowhere> 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 Tue, 18 Aug 2009, Frederic Weisbecker wrote: > > > > @@ -568,7 +568,7 @@ static void ftrace_raw_event_##call(proto) \ > > > > trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ > > > > } \ > > > > \ > > > > -static int ftrace_raw_reg_event_##call(void) \ > > > > +static int ftrace_raw_reg_event_##call(void *ptr) \ > > > > > > > > > Shouldn't it have a __used attribute here, or something? > > > > Do function parameters need that? There's lots of places where the > > parameter of a function is not used by a function itself. > > > > -- Steve > > > No actually, I thought gcc would warn, but it didn't :-) Yeah, that is the right thing too. Because functions can be passed as parameters (like this one) and every "stub function" we have will then need this attribute. It is OK to ignore parameters of functions without telling gcc that you plan on ignoring them. -- Steve