All of lore.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

* Re: [PATCH] trace event skb remove duplicate null-pointer check
  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-09 21:10 ` [tip:perf/urgent] tracing: remove duplicate null-pointer check in skb tracepoint tip-bot for Mathieu Desnoyers
  1 sibling, 1 reply; 7+ messages in thread
From: David Miller @ 2011-01-06 18:15 UTC (permalink / raw)
  To: mathieu.desnoyers
  Cc: rostedt, nhorman, fweisbec, zhaolei, linux-kernel, mingo, tglx

From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Thu, 6 Jan 2011 12:53:19 -0500

> 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>

Acked-by: David S. Miller <davem@davemloft.net>

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

* Re: [PATCH] trace event skb remove duplicate null-pointer check
  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
  0 siblings, 2 replies; 7+ messages in thread
From: Frederic Weisbecker @ 2011-01-06 18:17 UTC (permalink / raw)
  To: David Miller
  Cc: mathieu.desnoyers, rostedt, nhorman, zhaolei, linux-kernel, mingo,
	tglx

On Thu, Jan 06, 2011 at 10:15:44AM -0800, David Miller wrote:
> From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Date: Thu, 6 Jan 2011 12:53:19 -0500
> 
> > 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>
> 
> Acked-by: David S. Miller <davem@davemloft.net>

May be you want to take that on the net tree? Looks like more appropriate.
Of course this can go through the tracing tree as well.

Thanks.

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

* Re: [PATCH] trace event skb remove duplicate null-pointer check
  2011-01-06 18:17   ` Frederic Weisbecker
@ 2011-01-06 18:37     ` David Miller
  2011-01-06 18:38     ` Mathieu Desnoyers
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2011-01-06 18:37 UTC (permalink / raw)
  To: fweisbec
  Cc: mathieu.desnoyers, rostedt, nhorman, zhaolei, linux-kernel, mingo,
	tglx

From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Thu, 6 Jan 2011 19:17:29 +0100

> On Thu, Jan 06, 2011 at 10:15:44AM -0800, David Miller wrote:
>> From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Date: Thu, 6 Jan 2011 12:53:19 -0500
>> 
>> > 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>
>> 
>> Acked-by: David S. Miller <davem@davemloft.net>
> 
> May be you want to take that on the net tree? Looks like more appropriate.
> Of course this can go through the tracing tree as well.

You guys can take it in the tracing tree, this actually makes things
easier for me.

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

* Re: [PATCH] trace event skb remove duplicate null-pointer check
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Mathieu Desnoyers @ 2011-01-06 18:38 UTC (permalink / raw)
  To: Frederic Weisbecker
  Cc: David Miller, rostedt, nhorman, zhaolei, linux-kernel, mingo,
	tglx

* Frederic Weisbecker (fweisbec@gmail.com) wrote:
> On Thu, Jan 06, 2011 at 10:15:44AM -0800, David Miller wrote:
> > From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > Date: Thu, 6 Jan 2011 12:53:19 -0500
> > 
> > > 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>
> > 
> > Acked-by: David S. Miller <davem@davemloft.net>
> 
> May be you want to take that on the net tree? Looks like more appropriate.
> Of course this can go through the tracing tree as well.

It might be easier to manage the TRACE_EVENT() reshaping (removal of semicolumn,
tp_assign, etc) I am preparing if, at this stage, we merge most of the
include/trace/event patches through a single tree (the tracing tree). Otherwise
we might end up with more commit cross-dependencies between the trees, and
increase the risk of conflicts.

Thanks,

Mathieu

> 
> Thanks.

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

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

* Re: [PATCH] trace event skb remove duplicate null-pointer check
  2011-01-06 18:38     ` Mathieu Desnoyers
@ 2011-01-06 18:47       ` Frederic Weisbecker
  0 siblings, 0 replies; 7+ messages in thread
From: Frederic Weisbecker @ 2011-01-06 18:47 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: David Miller, rostedt, nhorman, zhaolei, linux-kernel, mingo,
	tglx

On Thu, Jan 06, 2011 at 01:38:02PM -0500, Mathieu Desnoyers wrote:
> * Frederic Weisbecker (fweisbec@gmail.com) wrote:
> > On Thu, Jan 06, 2011 at 10:15:44AM -0800, David Miller wrote:
> > > From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> > > Date: Thu, 6 Jan 2011 12:53:19 -0500
> > > 
> > > > 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>
> > > 
> > > Acked-by: David S. Miller <davem@davemloft.net>
> > 
> > May be you want to take that on the net tree? Looks like more appropriate.
> > Of course this can go through the tracing tree as well.
> 
> It might be easier to manage the TRACE_EVENT() reshaping (removal of semicolumn,
> tp_assign, etc) I am preparing if, at this stage, we merge most of the
> include/trace/event patches through a single tree (the tracing tree). Otherwise
> we might end up with more commit cross-dependencies between the trees, and
> increase the risk of conflicts.

Alright, let's take that on the tracing tree.

I'll apply them if Steve doesn't beat me at it.

Thanks.

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

* [tip:perf/urgent] tracing: remove duplicate null-pointer check in skb tracepoint
  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-09 21:10 ` tip-bot for Mathieu Desnoyers
  1 sibling, 0 replies; 7+ messages in thread
From: tip-bot for Mathieu Desnoyers @ 2011-01-09 21:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, mathieu.desnoyers, zhaolei, davem,
	fweisbec, nhorman, rostedt, tglx, mingo

Commit-ID:  881fe4bdcdc899674524e30a76c76d298b447008
Gitweb:     http://git.kernel.org/tip/881fe4bdcdc899674524e30a76c76d298b447008
Author:     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Thu, 6 Jan 2011 12:53:19 -0500
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Fri, 7 Jan 2011 20:55:42 -0500

tracing: remove duplicate null-pointer check in skb tracepoint

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>
LKML-Reference: <20110106175319.GA30610@Krystal>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
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>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 include/trace/events/skb.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/include/trace/events/skb.h b/include/trace/events/skb.h
index 75ce9d5..f10293c 100644
--- a/include/trace/events/skb.h
+++ b/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;
 	),
 

^ permalink raw reply related	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.