public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] x86/cache_info: use ARRAY_SIZE() in amd_l3_attrs()
@ 2012-10-02  8:34 Dan Carpenter
  2012-10-02 10:27 ` Srivatsa S. Bhat
  2012-10-05  7:22 ` [tip:x86/urgent] x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs( ) tip-bot for Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-10-02  8:34 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Ingo Molnar, H. Peter Anvin, x86, Shai Fultheim,
	Greg Kroah-Hartman, Andreas Herrmann, Srivatsa S. Bhat,
	linux-kernel, kernel-janitors

Using ARRAY_SIZE() is more readable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 9a7c90d..93c5451 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)
 	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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-05  7:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02  8:34 [patch] x86/cache_info: use ARRAY_SIZE() in amd_l3_attrs() Dan Carpenter
2012-10-02 10:27 ` Srivatsa S. Bhat
2012-10-05  7:22 ` [tip:x86/urgent] x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs( ) tip-bot for Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox