[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJieiUhMs6BPue67NJvQ=WAkU078OfDskt29uPSsDQatV51jnw@mail.gmail.com>
Date: Tue, 26 Mar 2019 17:20:12 -0700
From: Roopa Prabhu <roopa@...ulusnetworks.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Hariprasad Kelam <hariprasad.kelam@...il.com>, mingo@...hat.com,
David Miller <davem@...emloft.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] trace: events: fix error directive in argument list
On Mon, Mar 25, 2019 at 1:11 PM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Tue, 26 Mar 2019 01:23:03 +0530
> Hariprasad Kelam <hariprasad.kelam@...il.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.
Powered by blists - more mailing lists