All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf test: check if cpu_map__new() return NULL
@ 2011-01-14 23:00 Han Pingtian
  2011-01-15 13:03 ` Arnaldo Carvalho de Melo
  2011-01-26  7:19 ` [tip:perf/core] " tip-bot for Han Pingtian
  0 siblings, 2 replies; 3+ messages in thread
From: Han Pingtian @ 2011-01-14 23:00 UTC (permalink / raw)
  To: acme; +Cc: linux-kernel

It looks like we should check if cpus is NULL after

	cpus = cpu_map__new(NULL);

in test__open_syscall_event_on_all_cpus().

Signed-off-by: Han Pingtian <phan@redhat.com>
---
 tools/perf/builtin-test.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 419ce20..e7f098b 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -348,8 +348,8 @@ static int test__open_syscall_event_on_all_cpus(void)
 	}
 
 	cpus = cpu_map__new(NULL);
-	if (threads == NULL) {
-		pr_debug("thread_map__new\n");
+	if (cpus == NULL) {
+		pr_debug("cpu_map__new\n");
 		return -1;
 	}
 
-- 
1.7.3.4

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

* Re: [PATCH] perf test: check if cpu_map__new() return NULL
  2011-01-14 23:00 [PATCH] perf test: check if cpu_map__new() return NULL Han Pingtian
@ 2011-01-15 13:03 ` Arnaldo Carvalho de Melo
  2011-01-26  7:19 ` [tip:perf/core] " tip-bot for Han Pingtian
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-01-15 13:03 UTC (permalink / raw)
  To: Han Pingtian; +Cc: linux-kernel

Em Sat, Jan 15, 2011 at 07:00:50AM +0800, Han Pingtian escreveu:
> It looks like we should check if cpus is NULL after
> 
> 	cpus = cpu_map__new(NULL);
> 
> in test__open_syscall_event_on_all_cpus().

Right, thanks,

- Arnaldo

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

* [tip:perf/core] perf test: check if cpu_map__new() return NULL
  2011-01-14 23:00 [PATCH] perf test: check if cpu_map__new() return NULL Han Pingtian
  2011-01-15 13:03 ` Arnaldo Carvalho de Melo
@ 2011-01-26  7:19 ` tip-bot for Han Pingtian
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Han Pingtian @ 2011-01-26  7:19 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, phan, tglx

Commit-ID:  98d77b78504a423fca911a26a17bee00ef2fdda2
Gitweb:     http://git.kernel.org/tip/98d77b78504a423fca911a26a17bee00ef2fdda2
Author:     Han Pingtian <phan@redhat.com>
AuthorDate: Sat, 15 Jan 2011 07:00:50 +0800
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Sat, 22 Jan 2011 19:56:30 -0200

perf test: check if cpu_map__new() return NULL

It looks like we should check if cpus is NULL after

	cpus = cpu_map__new(NULL);

in test__open_syscall_event_on_all_cpus().

LKML-Reference: <20110114230050.GA7011@localhost>
Signed-off-by: Han Pingtian <phan@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-test.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 7cc6b20..5a50e47 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -347,9 +347,9 @@ static int test__open_syscall_event_on_all_cpus(void)
 	}
 
 	cpus = cpu_map__new(NULL);
-	if (threads == NULL) {
-		pr_debug("thread_map__new\n");
-		return -1;
+	if (cpus == NULL) {
+		pr_debug("cpu_map__new\n");
+		goto out_thread_map_delete;
 	}
 
 

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

end of thread, other threads:[~2011-01-26  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14 23:00 [PATCH] perf test: check if cpu_map__new() return NULL Han Pingtian
2011-01-15 13:03 ` Arnaldo Carvalho de Melo
2011-01-26  7:19 ` [tip:perf/core] " tip-bot for Han Pingtian

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.