Messages in this thread | | | Date | Mon, 17 Aug 2009 20:06:24 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: [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
| |