[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190326185012.GA7233@hari-Inspiron-1545>
Date: Wed, 27 Mar 2019 00:20:12 +0530
From: Hariprasad Kelam <hariprasad.kelam@...il.com>
To: rostedt@...dmis.org, mingo@...hat.com, laoar.shao@...il.com,
davem@...emloft.net, linux-kernel@...r.kernel.org
Subject: [PATCH] net: trace : fix error directive in argument list
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@...il.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
Powered by blists - more mailing lists