[PATCH] net: trace : fix error directive in argument list
From: Hariprasad Kelam
Date: Tue Mar 26 2019 - 15:38:44 EST
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@xxxxxxxxx>
---
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