Commit-ID: 6444174548f6556fcf26c84d5296defd295914c4 Gitweb: http://git.kernel.org/tip/6444174548f6556fcf26c84d5296defd295914c4 Author: Sasha Levin <[email protected]> AuthorDate: Thu, 20 Dec 2012 14:11:34 -0500 Committer: H. Peter Anvin <[email protected]> CommitDate: Thu, 20 Dec 2012 11:49:39 -0800
arch/x86/platform/uv: use ARRAY_SIZE where possible Signed-off-by: Sasha Levin <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Cc: Cliff Wickman <[email protected]> Cc: Alex Shi <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]> --- arch/x86/platform/uv/tlb_uv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c index b8b3a37..933bea5 100644 --- a/arch/x86/platform/uv/tlb_uv.c +++ b/arch/x86/platform/uv/tlb_uv.c @@ -1463,7 +1463,7 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user, } if (input_arg == 0) { - elements = sizeof(stat_description)/sizeof(*stat_description); + elements = ARRAY_SIZE(stat_description); printk(KERN_DEBUG "# cpu: cpu number\n"); printk(KERN_DEBUG "Sender statistics:\n"); for (i = 0; i < elements; i++) @@ -1504,7 +1504,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr, char *q; int cnt = 0; int val; - int e = sizeof(tunables) / sizeof(*tunables); + int e = ARRAY_SIZE(tunables); p = instr + strspn(instr, WHITESPACE); q = p; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

