* [PATCH] kmemtrace: Fix up tracer registration.
@ 2009-09-28 7:55 Paul Mundt
2009-09-28 8:37 ` Pekka Enberg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paul Mundt @ 2009-09-28 7:55 UTC (permalink / raw
To: Li Zefan, Ingo Molnar
Cc: Pekka Enberg, Eduard - Gabriel Munteanu, Steven Rostedt,
Frederic Weisbecker, linux-kernel
Commit ddc1637af217dbd8bc51f30e6d24e84476a869a6
("kmemtrace: Print binary output only if 'bin' option is set") ended up
inverting the error detection logic. register_tracer() returns 0 on
success, which this change caused to treat as an error, resulting in:
[ 0.132000] Warning: could not register the kmem tracer
as well as bailing out of the initcall with an error value. This
restores the old logic.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/kmemtrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index 81b1645..a91da69 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -501,7 +501,7 @@ static int __init init_kmem_tracer(void)
return 1;
}
- if (!register_tracer(&kmem_tracer)) {
+ if (register_tracer(&kmem_tracer) != 0) {
pr_warning("Warning: could not register the kmem tracer\n");
return 1;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kmemtrace: Fix up tracer registration.
2009-09-28 7:55 [PATCH] kmemtrace: Fix up tracer registration Paul Mundt
@ 2009-09-28 8:37 ` Pekka Enberg
2009-09-28 9:08 ` Frederic Weisbecker
2009-10-01 9:59 ` [tip:tracing/urgent] " tip-bot for Paul Mundt
2 siblings, 0 replies; 4+ messages in thread
From: Pekka Enberg @ 2009-09-28 8:37 UTC (permalink / raw
To: Paul Mundt, Li Zefan, Ingo Molnar, Pekka Enberg,
Eduard - Gabriel Munteanu, Steven Rostedt, Frederic Weisbecker,
linux-kernel
On Mon, Sep 28, 2009 at 10:55 AM, Paul Mundt <lethal@linux-sh.org> wrote:
> Commit ddc1637af217dbd8bc51f30e6d24e84476a869a6
> ("kmemtrace: Print binary output only if 'bin' option is set") ended up
> inverting the error detection logic. register_tracer() returns 0 on
> success, which this change caused to treat as an error, resulting in:
>
> [ 0.132000] Warning: could not register the kmem tracer
>
> as well as bailing out of the initcall with an error value. This
> restores the old logic.
>
> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Looks good to me. Thanks Paul!
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kmemtrace: Fix up tracer registration.
2009-09-28 7:55 [PATCH] kmemtrace: Fix up tracer registration Paul Mundt
2009-09-28 8:37 ` Pekka Enberg
@ 2009-09-28 9:08 ` Frederic Weisbecker
2009-10-01 9:59 ` [tip:tracing/urgent] " tip-bot for Paul Mundt
2 siblings, 0 replies; 4+ messages in thread
From: Frederic Weisbecker @ 2009-09-28 9:08 UTC (permalink / raw
To: Paul Mundt, Li Zefan, Ingo Molnar, Pekka Enberg,
Eduard - Gabriel Munteanu, Steven Rostedt, linux-kernel
On Mon, Sep 28, 2009 at 04:55:40PM +0900, Paul Mundt wrote:
> Commit ddc1637af217dbd8bc51f30e6d24e84476a869a6
> ("kmemtrace: Print binary output only if 'bin' option is set") ended up
> inverting the error detection logic. register_tracer() returns 0 on
> success, which this change caused to treat as an error, resulting in:
>
> [ 0.132000] Warning: could not register the kmem tracer
>
> as well as bailing out of the initcall with an error value. This
> restores the old logic.
>
> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> Cc: Li Zefan <lizf@cn.fujitsu.com>
> Cc: Pekka Enberg <penberg@cs.helsinki.fi>
> Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
> Cc: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:tracing/urgent] kmemtrace: Fix up tracer registration
2009-09-28 7:55 [PATCH] kmemtrace: Fix up tracer registration Paul Mundt
2009-09-28 8:37 ` Pekka Enberg
2009-09-28 9:08 ` Frederic Weisbecker
@ 2009-10-01 9:59 ` tip-bot for Paul Mundt
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Paul Mundt @ 2009-10-01 9:59 UTC (permalink / raw
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, lizf, penberg, eduard.munteanu, lethal,
fweisbec, rostedt, tglx, mingo
Commit-ID: f9ac5a69edee0ee7e06a05727226e3f275306c8d
Gitweb: http://git.kernel.org/tip/f9ac5a69edee0ee7e06a05727226e3f275306c8d
Author: Paul Mundt <lethal@linux-sh.org>
AuthorDate: Mon, 28 Sep 2009 16:55:40 +0900
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 1 Oct 2009 11:53:44 +0200
kmemtrace: Fix up tracer registration
Commit ddc1637af217dbd8bc51f30e6d24e84476a869a6 ("kmemtrace: Print
binary output only if 'bin' option is set") ended up inverting the
error detection logic. register_tracer() returns 0 on success,
which this change caused to treat as an error, resulting in:
[ 0.132000] Warning: could not register the kmem tracer
as well as bailing out of the initcall with an error value. This
restores the old logic.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <20090928075540.GD6668@linux-sh.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/trace/kmemtrace.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index 81b1645..a91da69 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -501,7 +501,7 @@ static int __init init_kmem_tracer(void)
return 1;
}
- if (!register_tracer(&kmem_tracer)) {
+ if (register_tracer(&kmem_tracer) != 0) {
pr_warning("Warning: could not register the kmem tracer\n");
return 1;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-01 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-28 7:55 [PATCH] kmemtrace: Fix up tracer registration Paul Mundt
2009-09-28 8:37 ` Pekka Enberg
2009-09-28 9:08 ` Frederic Weisbecker
2009-10-01 9:59 ` [tip:tracing/urgent] " tip-bot for Paul Mundt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).