[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-961c79761dda351b5fb263a0654b98daac130b7a@git.kernel.org>
Date: Fri, 5 Oct 2012 00:22:26 -0700
From: tip-bot for Dan Carpenter <dan.carpenter@...cle.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
andreas.herrmann3@....com, srivatsa.bhat@...ux.vnet.ibm.com,
shai@...lemp.com, gregkh@...e.de, tglx@...utronix.de,
dan.carpenter@...cle.com
Subject: [tip:x86/urgent] x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs(
)
Commit-ID: 961c79761dda351b5fb263a0654b98daac130b7a
Gitweb: http://git.kernel.org/tip/961c79761dda351b5fb263a0654b98daac130b7a
Author: Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Tue, 2 Oct 2012 11:34:09 +0300
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 4 Oct 2012 13:28:08 +0200
x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs()
Using ARRAY_SIZE() is more readable.
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
Cc: Shai Fultheim <shai@...lemp.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Cc: Andreas Herrmann <andreas.herrmann3@....com>
Link: http://lkml.kernel.org/r/20121002083409.GM12398@elgon.mountain
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists