From: Sasha Levin Date: Thu, 20 Dec 2012 19:11:16 +0000 (-0500) Subject: perf kmem: use ARRAY_SIZE instead of reinventing it X-Git-Tag: MMI-PSA29.97-13-9~15047^2~13^2~47 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49e4ba54592435cbd150aea8f5ae6b776fc687f9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf kmem: use ARRAY_SIZE instead of reinventing it Signed-off-by: Sasha Levin Cc: Ingo Molnar Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1356030701-16284-8-git-send-email-sasha.levin@oracle.com Signed-off-by: Arnaldo Carvalho de Melo --- 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) {