]> Git Repo - linux.git/commitdiff
x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs()
authorDan Carpenter <[email protected]>
Tue, 2 Oct 2012 08:34:09 +0000 (11:34 +0300)
committerIngo Molnar <[email protected]>
Thu, 4 Oct 2012 11:28:08 +0000 (13:28 +0200)
Using ARRAY_SIZE() is more readable.

Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Srivatsa S. Bhat <[email protected]>
Cc: Shai Fultheim <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/cpu/intel_cacheinfo.c

index 9a7c90d80bc4c87bafd96cb73efb46ced84b5276..93c5451bdd527ca9436a98b661e9f3165e484570 100644 (file)
@@ -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;
This page took 0.076015 seconds and 4 git commands to generate.