lkml.org 
[lkml]   [2009]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/12] add ftrace_event_call void * 'data' field

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



\
 
 \ /
  Last update: 2009-08-18 02:09    [W:0.613 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site