summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/profile.c6
-rw-r--r--tools/perf/util/event.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/kernel/profile.c b/kernel/profile.c
index 66f841b7fbd3..14c9f87b9fc9 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -126,11 +126,9 @@ int __ref profile_init(void)
if (prof_buffer)
return 0;
- prof_buffer = vmalloc(buffer_bytes);
- if (prof_buffer) {
- memset(prof_buffer, 0, buffer_bytes);
+ prof_buffer = vzalloc(buffer_bytes);
+ if (prof_buffer)
return 0;
- }
free_cpumask_var(prof_cpu_mask);
return -ENOMEM;
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 252b72a5e59e..6635fcd11ca5 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type)
int i;
for (i = 0; i < 64; i++) {
- if (mask & (1UL << i))
+ if (mask & (1ULL << i))
size++;
}