Skip to content

Commit

Permalink
perf kmem: use ARRAY_SIZE instead of reinventing it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sasha Levin authored and Arnaldo Carvalho de Melo committed Jan 24, 2013
1 parent 53985a7 commit 49e4ba5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 49e4ba5

Please sign in to comment.