diff options
author | Alex Unleashed <alex@flawedcode.org> | 2007-11-14 20:01:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:45:46 -0500 |
commit | 16ad1b49104684da3ab0fede79f29b01f4c76896 (patch) | |
tree | 941aa34bbe00df34f619526e198d9d6e0124f45c /arch/cris/arch-v10 | |
parent | f150f35232daaedd86e46d2581e3b7eb40e2c360 (diff) |
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 <alex@flawedcode.org>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/arch-v10')
-rw-r--r-- | arch/cris/arch-v10/kernel/io_interface_mux.c | 2 | ||||
-rw-r--r-- | arch/cris/arch-v10/kernel/setup.c | 4 |
2 files changed, 3 insertions, 3 deletions
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_ | |||
304 | static struct if_group *get_group(const unsigned char groups) | 304 | static struct if_group *get_group(const unsigned char groups) |
305 | { | 305 | { |
306 | int i; | 306 | int i; |
307 | for (i = 0; i < sizeof(if_groups)/sizeof(struct if_group); i++) { | 307 | for (i = 0; i < ARRAY_SIZE(if_groups); i++) { |
308 | if (groups & if_groups[i].group) { | 308 | if (groups & if_groups[i].group) { |
309 | return &if_groups[i]; | 309 | return &if_groups[i]; |
310 | } | 310 | } |
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) | |||
57 | 57 | ||
58 | revision = rdvr(); | 58 | revision = rdvr(); |
59 | 59 | ||
60 | if (revision >= sizeof cpu_info/sizeof *cpu_info) | 60 | if (revision >= ARRAY_SIZE(cpu_info)) |
61 | info = &cpu_info[sizeof cpu_info/sizeof *cpu_info - 1]; | 61 | info = &cpu_info[ARRAY_SIZE(cpu_info) - 1]; |
62 | else | 62 | else |
63 | info = &cpu_info[revision]; | 63 | info = &cpu_info[revision]; |
64 | 64 | ||