[PATCH] rasd: Use perf_evlist__open() instead of open coded equivalent
From: Arnaldo Carvalho de Melo
Date: Mon Oct 06 2014 - 14:43:42 EST
Cc: Borislav Petkov <bp@xxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
src/rasd.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/rasd.c b/src/rasd.c
index 06ccdcdd9d56..fb33fca131fa 100644
--- a/src/rasd.c
+++ b/src/rasd.c
@@ -241,7 +241,6 @@ static void daemonize(void)
int main()
{
- struct perf_evsel *c;
struct thread_map *threads;
struct cpu_map *cpus;
int i;
@@ -278,12 +277,9 @@ int main()
perf_evlist__set_maps(evlist, cpus, threads);
/* Open events */
- evlist__for_each(evlist, c) {
- /* On all online cpus by default, system wide tracing */
- if (perf_evsel__open(c, evlist->cpus, NULL) < 0)
- err("opening tracepoint, are you root?");
- }
- perf_evlist__set_id_pos(evlist);
+ /* On all online cpus by default, system wide tracing */
+ if (perf_evlist__open(evlist) < 0)
+ err("opening tracepoint, are you root?");
/* mmap buffers */
if (perf_evlist__mmap(evlist, 4 /* opts->mmap_pages */, false) < 0)
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/