Commit 49e4ba54592435cbd150aea8f5ae6b776fc687f9
Committed by
Arnaldo Carvalho de Melo
1 parent
53985a7bfa
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
tools/perf/builtin-kmem.c
... | ... | @@ -609,8 +609,7 @@ |
609 | 609 | &pingpong_sort_dimension, |
610 | 610 | }; |
611 | 611 | |
612 | -#define NUM_AVAIL_SORTS \ | |
613 | - (int)(sizeof(avail_sorts) / sizeof(struct sort_dimension *)) | |
612 | +#define NUM_AVAIL_SORTS ((int)ARRAY_SIZE(avail_sorts)) | |
614 | 613 | |
615 | 614 | static int sort_dimension__add(const char *tok, struct list_head *list) |
616 | 615 | { |