mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Cc: mingo@redhat.com, roopa@cumulusnetworks.com, davem@davemloft.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trace: events: fix  error directive in argument list
Date: Mon, 25 Mar 2019 16:11:14 -0400	[thread overview]
Message-ID: <20190325161114.6a54bed0@gandalf.local.home> (raw)
In-Reply-To: <20190325195303.GA20629@hari-Inspiron-1545>

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.

-- Steve

  reply	other threads:[~2019-03-25 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 19:53 Hariprasad Kelam
2019-03-25 20:11 ` Steven Rostedt [this message]
2019-03-27  0:20   ` Roopa Prabhu
2019-03-27  0:19 ` Roopa Prabhu
2019-03-27 15:53 ` Steven Rostedt
2019-03-29 23:12   ` Luc Van Oostenryck
2019-03-29 23:22 ` Luc Van Oostenryck
2019-03-30 11:07   ` Hariprasad Kelam
2019-03-30 12:01     ` Luc Van Oostenryck
2019-03-30 12:40       ` Steven Rostedt
2019-03-30 13:50         ` Roopa Prabhu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190325161114.6a54bed0@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=davem@davemloft.net \
    --cc=hariprasad.kelam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roopa@cumulusnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®