lkml.org 
[lkml]   [2013]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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;
> > +}
>
>



\
 
 \ /
  Last update: 2013-11-23 10:41    [W:0.114 / U:1.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site