public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trace event skb remove duplicate null-pointer check
@ 2011-01-06 17:53 Mathieu Desnoyers
  2011-01-06 18:15 ` David Miller
  2011-01-09 21:10 ` [tip:perf/urgent] tracing: remove duplicate null-pointer check in skb tracepoint tip-bot for Mathieu Desnoyers
  0 siblings, 2 replies; 7+ messages in thread
From: Mathieu Desnoyers @ 2011-01-06 17:53 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Neil Horman, Frederic Weisbecker, Zhaolei, LKML, Ingo Molnar,
	Thomas Gleixner

The check for NULL skb in the kfree_skb trace event is a duplicate from the
check already done in its only caller, kfree_skb(). Remove this duplicate check.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Zhaolei <zhaolei@cn.fujitsu.com>
---
 include/trace/events/skb.h |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6-lttng/include/trace/events/skb.h
===================================================================
--- linux-2.6-lttng.orig/include/trace/events/skb.h
+++ linux-2.6-lttng/include/trace/events/skb.h
@@ -25,9 +25,7 @@ TRACE_EVENT(kfree_skb,
 
 	TP_fast_assign(
 		__entry->skbaddr = skb;
-		if (skb) {
-			__entry->protocol = ntohs(skb->protocol);
-		}
+		__entry->protocol = ntohs(skb->protocol);
 		__entry->location = location;
 	),
 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-09 21:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-06 17:53 [PATCH] trace event skb remove duplicate null-pointer check Mathieu Desnoyers
2011-01-06 18:15 ` David Miller
2011-01-06 18:17   ` Frederic Weisbecker
2011-01-06 18:37     ` David Miller
2011-01-06 18:38     ` Mathieu Desnoyers
2011-01-06 18:47       ` Frederic Weisbecker
2011-01-09 21:10 ` [tip:perf/urgent] tracing: remove duplicate null-pointer check in skb tracepoint tip-bot for Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox