Skip to content

Commit

Permalink
x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs()
Browse files Browse the repository at this point in the history
Using ARRAY_SIZE() is more readable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Shai Fultheim <shai@scalemp.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
Link: http://lkml.kernel.org/r/20121002083409.GM12398@elgon.mountain
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Dan Carpenter authored and Ingo Molnar committed Oct 4, 2012
1 parent fcd8af5 commit 961c797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/intel_cacheinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void)
if (attrs)
return attrs;

n = sizeof (default_attrs) / sizeof (struct attribute *);
n = ARRAY_SIZE(default_attrs);

if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
n += 2;
Expand Down

0 comments on commit 961c797

Please sign in to comment.