lkml.org 
[lkml]   [2019]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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/net.h:171:1: error: directive in argument list
./include/trace/events/net.h:173:1: error: directive in argument list
./include/trace/events/net.h:175:1: error: directive in argument list
./include/trace/events/net.h:171:1: error: directive in argument list
./include/trace/events/net.h:173:1: error: directive in argument list
./include/trace/events/net.h:175:1: error: directive in argument list

To avoid sparse error changed
to
if (IS_ENABLED(CONFIG_NET_RX_BUSY_POLL))

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
include/trace/events/net.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/trace/events/net.h b/include/trace/events/net.h
index 1efd7d9..49e6003 100644
--- a/include/trace/events/net.h
+++ b/include/trace/events/net.h
@@ -168,11 +168,12 @@ DECLARE_EVENT_CLASS(net_dev_rx_verbose_template,

TP_fast_assign(
__assign_str(name, skb->dev->name);
-#ifdef CONFIG_NET_RX_BUSY_POLL
- __entry->napi_id = skb->napi_id;
-#else
- __entry->napi_id = 0;
-#endif
+
+ if (IS_ENABLED(CONFIG_NET_RX_BUSY_POLL))
+ __entry->napi_id = skb->napi_id;
+ else
+ __entry->napi_id = 0;
+
__entry->queue_mapping = skb->queue_mapping;
__entry->skbaddr = skb;
__entry->vlan_tagged = skb_vlan_tag_present(skb);
--
2.7.4
\
 
 \ /
  Last update: 2019-03-26 20:39    [W:0.019 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site