lkml.org 
[lkml]   [2019]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] trace: events: fix error directive in argument list
On Mon, Mar 25, 2019 at 1:11 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Tue, 26 Mar 2019 01:23:03 +0530
> Hariprasad Kelam <hariprasad.kelam@gmail.com> wrote:
>
>
> > ---
> > include/trace/events/neigh.h | 19 +++++--------------
> > 1 file changed, 5 insertions(+), 14 deletions(-)
> >
> > diff --git a/include/trace/events/neigh.h b/include/trace/events/neigh.h
> > index 0bdb085..6e310ea 100644
> > --- a/include/trace/events/neigh.h
> > +++ b/include/trace/events/neigh.h
> > @@ -70,15 +70,11 @@ TRACE_EVENT(neigh_update,
> > else
> > *p32 = 0;
> >
> > -#if IS_ENABLED(CONFIG_IPV6)
> > - if (n->tbl->family == AF_INET6) {
> > - pin6 = (struct in6_addr *)__entry->primary_key6;
> > + if (IS_ENABLED(CONFIG_IPV6) && n->tbl->family == AF_INET6)
> > *pin6 = *(struct in6_addr *)n->primary_key;
> > - } else
> > -#endif
> > - {
> > + else
> > ipv6_addr_set_v4mapped(*p32, pin6);
> > - }
> > +
> > __entry->confirmed = n->confirmed;
> > __entry->updated = n->updated;
> > __entry->used = n->used;
>
> Not sure why the added pin6 assignment was there to begin with:
>
> <code-snippet>
> pin6 = (struct in6_addr *)__entry->primary_key6;
> p32 = (__be32 *)__entry->primary_key4;
>
> if (n->tbl->family == AF_INET)
> *p32 = *(__be32 *)n->primary_key;
> else
> *p32 = 0;
>
> #if IS_ENABLED(CONFIG_IPV6)
> if (n->tbl->family == AF_INET6) {
> pin6 = (struct in6_addr *)__entry->primary_key6;
> *pin6 = *(struct in6_addr *)n->primary_key;
> } else
> #endif
> {
> ipv6_addr_set_v4mapped(*p32, pin6);
> }
> </code-snippet>
>
> It was already assigned. Looks fine to me, at least from a tracing
> point of view.

yes, agree. I will send a follow up patch to remove the redundant pin6
assignment.

\
 
 \ /
  Last update: 2019-03-27 01:28    [W:0.065 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site