Messages in this thread | | | Date | Sat, 23 Nov 2013 04:27:30 -0500 | From | Steven Rostedt <> | Subject | Re: [PATCH 13/22] tools lib traceevent: Add cfg80211 plugin |
| |
On Sat, 23 Nov 2013 00:16:14 +0900 Namhyung Kim <namhyung@kernel.org> wrote:
> [SNIP] > > +unsigned long long process___le16_to_cpup(struct trace_seq *s, > > + unsigned long long *args) > > +{ > > + uint16_t *val = (uint16_t *) args[0]; > > + return val ? (long long) le16toh(*val) : 0; > > +} > > + > > +int PEVENT_PLUGIN_LOADER(struct pevent *pevent) > > +{ > > + pevent_register_print_function(pevent, > > + process___le16_to_cpup, > > + PEVENT_FUNC_ARG_INT, > > Just a nitpick. The function should return int or the return type > should be _LONG for consistency.
As stated in another reply, the return type is not for the callback, but instead for the function it is representing.
-- Steve
> > Thanks, > Namhyung > > > + "__le16_to_cpup", > > + PEVENT_FUNC_ARG_PTR, > > + PEVENT_FUNC_ARG_VOID); > > + return 0; > > +} > >
| |