summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorSasha Levin <sasha.levin@oracle.com>2012-12-20 14:11:16 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-24 16:40:15 -0300
commit49e4ba54592435cbd150aea8f5ae6b776fc687f9 (patch)
tree57c46868bf08be3594033b67c9db16ed52d6a5ae /tools/perf
parent53985a7bfa7b947c91f35c6adcdc9cacc6fef07f (diff)
downloadblackbird-op-linux-49e4ba54592435cbd150aea8f5ae6b776fc687f9.tar.gz
blackbird-op-linux-49e4ba54592435cbd150aea8f5ae6b776fc687f9.zip
perf kmem: use ARRAY_SIZE instead of reinventing it
Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1356030701-16284-8-git-send-email-sasha.levin@oracle.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-kmem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 9fddca749ca2..c746108c5d48 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -609,8 +609,7 @@ static struct sort_dimension *avail_sorts[] = {
&pingpong_sort_dimension,
};
-#define NUM_AVAIL_SORTS \
- (int)(sizeof(avail_sorts) / sizeof(struct sort_dimension *))
+#define NUM_AVAIL_SORTS ((int)ARRAY_SIZE(avail_sorts))
static int sort_dimension__add(const char *tok, struct list_head *list)
{
OpenPOWER on IntegriCloud