From 3c8b81864080b710bdce446fd8401923f26fc4d4 Mon Sep 17 00:00:00 2001 From: Yury Norov Date: Sat, 23 Jun 2018 10:35:01 +0300 Subject: perf tools: Drop unneeded bitmap_zero() calls bitmap_zero() is called after bitmap_alloc() in perf code. But bitmap_alloc() internally uses calloc() which guarantees that allocated area is zeroed. So following bitmap_zero is unneeded. Drop it. This happened because of confusing name for bitmap allocator. It should has name bitmap_zalloc instead of bitmap_alloc. This series: https://lkml.org/lkml/2018/6/18/841 introduces a new API for bitmap allocations in kernel, and functions there are named correctly. Following patch propogates the API to tools, and fixes naming issue. Signed-off-by: Yury Norov Cc: Alexander Shishkin Cc: Andi Kleen Cc: Andrew Morton Cc: Andriy Shevchenko Cc: David Ahern Cc: David Carrillo-Cisneros Cc: Dmitry Torokhov Cc: Jin Yao Cc: Jiri Olsa Cc: Kate Stewart Cc: Matthew Wilcox Cc: Mike Snitzer Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Philippe Ombredanne Link: http://lkml.kernel.org/r/20180623073502.16321-1-ynorov@caviumnetworks.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/tests/bitmap.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'tools/perf/tests/bitmap.c') diff --git a/tools/perf/tests/bitmap.c b/tools/perf/tests/bitmap.c index 47bedf25ba69..96e7fc1ad3f9 100644 --- a/tools/perf/tests/bitmap.c +++ b/tools/perf/tests/bitmap.c @@ -16,8 +16,6 @@ static unsigned long *get_bitmap(const char *str, int nbits) bm = bitmap_alloc(nbits); if (map && bm) { - bitmap_zero(bm, nbits); - for (i = 0; i < map->nr; i++) set_bit(map->map[i], bm); } -- cgit v1.2.3