summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/s390-cpumsf.c
diff options
context:
space:
mode:
authorPaolo Bonzini2019-08-09 16:53:39 +0200
committerPaolo Bonzini2019-08-09 16:53:39 +0200
commit0e1c438c44dd9cde56effb44c5f1cfeda72e108d (patch)
treefa3492d4d7d8b7444e5d8ebe6c78210826333e4b /tools/perf/util/s390-cpumsf.c
parentselftests: kvm: Adding config fragments (diff)
parentarm64: KVM: hyp: debug-sr: Mark expected switch fall-through (diff)
downloadkernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.gz
kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.xz
kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.zip
Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3 - A bunch of switch/case fall-through annotation, fixing one actual bug - Fix PMU reset bug - Add missing exception class debug strings
Diffstat (limited to 'tools/perf/util/s390-cpumsf.c')
-rw-r--r--tools/perf/util/s390-cpumsf.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/util/s390-cpumsf.c b/tools/perf/util/s390-cpumsf.c
index 10d36d9b7909..83d2e149ef19 100644
--- a/tools/perf/util/s390-cpumsf.c
+++ b/tools/perf/util/s390-cpumsf.c
@@ -146,6 +146,7 @@
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/log2.h>
+#include <linux/zalloc.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -156,7 +157,6 @@
#include "evlist.h"
#include "machine.h"
#include "session.h"
-#include "util.h"
#include "thread.h"
#include "debug.h"
#include "auxtrace.h"
@@ -756,7 +756,7 @@ static int s390_cpumsf_run_decoder(struct s390_cpumsf_queue *sfq,
*/
if (err) {
sfq->buffer = NULL;
- list_del(&buffer->list);
+ list_del_init(&buffer->list);
auxtrace_buffer__free(buffer);
if (err > 0) /* Buffer done, no error */
err = 0;
@@ -1044,7 +1044,7 @@ static void s390_cpumsf_free(struct perf_session *session)
auxtrace_heap__free(&sf->heap);
s390_cpumsf_free_queues(session);
session->auxtrace = NULL;
- free(sf->logdir);
+ zfree(&sf->logdir);
free(sf);
}
@@ -1101,8 +1101,7 @@ static int s390_cpumsf__config(const char *var, const char *value, void *cb)
if (rc == -1 || !S_ISDIR(stbuf.st_mode)) {
pr_err("Missing auxtrace log directory %s,"
" continue with current directory...\n", value);
- free(sf->logdir);
- sf->logdir = NULL;
+ zfree(&sf->logdir);
}
return 1;
}
@@ -1162,7 +1161,7 @@ err_free_queues:
auxtrace_queues__free(&sf->queues);
session->auxtrace = NULL;
err_free:
- free(sf->logdir);
+ zfree(&sf->logdir);
free(sf);
return err;
}