diff options
author | Alex Unleashed <alex@flawedcode.org> | 2007-11-14 17:01:06 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 18:45:46 -0800 |
commit | 16ad1b49104684da3ab0fede79f29b01f4c76896 (patch) | |
tree | 941aa34bbe00df34f619526e198d9d6e0124f45c /arch/cris/arch-v32/kernel/setup.c | |
parent | f150f35232daaedd86e46d2581e3b7eb40e2c360 (diff) | |
download | blackbird-op-linux-16ad1b49104684da3ab0fede79f29b01f4c76896.tar.gz blackbird-op-linux-16ad1b49104684da3ab0fede79f29b01f4c76896.zip |
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-v32/kernel/setup.c')
-rw-r--r-- | arch/cris/arch-v32/kernel/setup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/cris/arch-v32/kernel/setup.c b/arch/cris/arch-v32/kernel/setup.c index 4662f363df63..72e9e8331f63 100644 --- a/arch/cris/arch-v32/kernel/setup.c +++ b/arch/cris/arch-v32/kernel/setup.c @@ -54,12 +54,10 @@ show_cpuinfo(struct seq_file *m, void *v) { int i; int cpu = (int)v - 1; - int entries; unsigned long revision; struct cpu_info *info; - entries = sizeof cpinfo / sizeof(struct cpu_info); - info = &cpinfo[entries - 1]; + info = &cpinfo[ARRAY_SIZE(cpinfo) - 1]; #ifdef CONFIG_SMP if (!cpu_online(cpu)) @@ -68,7 +66,7 @@ show_cpuinfo(struct seq_file *m, void *v) revision = rdvr(); - for (i = 0; i < entries; i++) { + for (i = 0; i < ARRAY_SIZE(cpinfo); i++) { if (cpinfo[i].rev == revision) { info = &cpinfo[i]; break; |