Re: [PATCH 07/12] add ftrace_event_call void * 'data' field

From: Steven Rostedt
Date: Mon Aug 17 2009 - 20:06:33 EST



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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/