Commit 961c7976 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ingo Molnar

x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs()

Using ARRAY_SIZE() is more readable.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarSrivatsa 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.mountainSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent fcd8af58
...@@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void) ...@@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void)
if (attrs) if (attrs)
return 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)) if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE))
n += 2; n += 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment