From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: rostedt@goodmis.org, mingo@redhat.com, laoar.shao@gmail.com,
davem@davemloft.net, linux-kernel@vger.kernel.org
Subject: [PATCH] net: trace : fix error directive in argument list
Date: Wed, 27 Mar 2019 00:20:12 +0530 [thread overview]
Message-ID: <20190326185012.GA7233@hari-Inspiron-1545> (raw)
This patch fixes below spare errors.
Sparse error:
make C=2 CF=-D__CHECK_ENDIAN__ M=net/core
./include/trace/events/sock.h:177:1: error: directive in argument list
./include/trace/events/sock.h:184:1: error: directive in argument list
./include/trace/events/sock.h:177:1: error: directive in argument list
./include/trace/events/sock.h:184:1: error: directive in argument list
Changed below two lines to signle line to avoid sparse error
-#if IS_ENABLED(CONFIG_IPV6)
- if (sk->sk_family == AF_INET6) {
to
if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
Moved address assigning of pin6 struct outside the loop.
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
include/trace/events/sock.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/trace/events/sock.h b/include/trace/events/sock.h
index a0c4b8a..22bee26 100644
--- a/include/trace/events/sock.h
+++ b/include/trace/events/sock.h
@@ -174,16 +174,14 @@ TRACE_EVENT(inet_sock_set_state,
p32 = (__be32 *) __entry->daddr;
*p32 = inet->inet_daddr;
-#if IS_ENABLED(CONFIG_IPV6)
- if (sk->sk_family == AF_INET6) {
- pin6 = (struct in6_addr *)__entry->saddr_v6;
+ pin6 = (struct in6_addr *)__entry->saddr_v6;
+
+ if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
*pin6 = sk->sk_v6_rcv_saddr;
pin6 = (struct in6_addr *)__entry->daddr_v6;
*pin6 = sk->sk_v6_daddr;
} else
-#endif
{
- pin6 = (struct in6_addr *)__entry->saddr_v6;
ipv6_addr_set_v4mapped(inet->inet_saddr, pin6);
pin6 = (struct in6_addr *)__entry->daddr_v6;
ipv6_addr_set_v4mapped(inet->inet_daddr, pin6);
--
2.7.4
next reply other threads:[~2019-03-26 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 18:50 Hariprasad Kelam [this message]
2019-03-26 19:38 Hariprasad Kelam
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=20190326185012.GA7233@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=davem@davemloft.net \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/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®