From 16ad1b49104684da3ab0fede79f29b01f4c76896 Mon Sep 17 00:00:00 2001 From: Alex Unleashed Date: Wed, 14 Nov 2007 17:01:06 -0800 Subject: cris: ARRAY_SIZE() cleanup I'm converting most array size calculations under arch/ to use ARRAY_SIZE(). This is the patch for CRIS. Signed-off-by: Alejandro Martinez Ruiz Cc: Mikael Starvik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/cris/arch-v10/kernel/io_interface_mux.c | 2 +- arch/cris/arch-v10/kernel/setup.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/cris/arch-v10') diff --git a/arch/cris/arch-v10/kernel/io_interface_mux.c b/arch/cris/arch-v10/kernel/io_interface_mux.c index 29d48ad00df9..3a9114e89edf 100644 --- a/arch/cris/arch-v10/kernel/io_interface_mux.c +++ b/arch/cris/arch-v10/kernel/io_interface_mux.c @@ -304,7 +304,7 @@ static unsigned char clear_group_from_set(const unsigned char groups, struct if_ static struct if_group *get_group(const unsigned char groups) { int i; - for (i = 0; i < sizeof(if_groups)/sizeof(struct if_group); i++) { + for (i = 0; i < ARRAY_SIZE(if_groups); i++) { if (groups & if_groups[i].group) { return &if_groups[i]; } diff --git a/arch/cris/arch-v10/kernel/setup.c b/arch/cris/arch-v10/kernel/setup.c index ad410afe3cc3..de27b50b72a2 100644 --- a/arch/cris/arch-v10/kernel/setup.c +++ b/arch/cris/arch-v10/kernel/setup.c @@ -57,8 +57,8 @@ int show_cpuinfo(struct seq_file *m, void *v) revision = rdvr(); - if (revision >= sizeof cpu_info/sizeof *cpu_info) - info = &cpu_info[sizeof cpu_info/sizeof *cpu_info - 1]; + if (revision >= ARRAY_SIZE(cpu_info)) + info = &cpu_info[ARRAY_SIZE(cpu_info) - 1]; else info = &cpu_info[revision]; -- cgit v1.2.3