diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-10-02 04:34:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-10-04 07:28:08 -0400 |
commit | 961c79761dda351b5fb263a0654b98daac130b7a (patch) | |
tree | 4770ed24548881f40c6747a12c472a95710de6f8 | |
parent | fcd8af585f587741c051f7124b8dee6c73c8629b (diff) |
x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs()
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>
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 9a7c90d80bc4..93c5451bdd52 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -991,7 +991,7 @@ static struct attribute ** __cpuinit amd_l3_attrs(void) | |||
991 | if (attrs) | 991 | if (attrs) |
992 | return attrs; | 992 | return attrs; |
993 | 993 | ||
994 | n = sizeof (default_attrs) / sizeof (struct attribute *); | 994 | n = ARRAY_SIZE(default_attrs); |
995 | 995 | ||
996 | if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE)) | 996 | if (amd_nb_has_feature(AMD_NB_L3_INDEX_DISABLE)) |
997 | n += 2; | 997 | n += 2; |