aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwish.07@gmail.com>2007-02-04 21:41:27 -0500
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-02-09 09:01:58 -0500
commit10b50b7dd2716b944299d45452d0875dbeb5f0c2 (patch)
tree07159c3d6a87d9dc3883ea6593df7713904a03eb /arch
parent6eb484fe92e2f67f888dc87e97bfd938c0f7404e (diff)
[AVR32] Use ARRAY_SIZE macro when appropriate
A patch to use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/avr32/kernel/setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index a34211601008..c6734aefb559 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/root_dev.h> 17#include <linux/root_dev.h>
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <linux/kernel.h>
19 20
20#include <asm/sections.h> 21#include <asm/sections.h>
21#include <asm/processor.h> 22#include <asm/processor.h>
@@ -174,8 +175,7 @@ static int __init parse_tag_mem_range(struct tag *tag,
174 * Copy the data so the bootmem init code doesn't need to care 175 * Copy the data so the bootmem init code doesn't need to care
175 * about it. 176 * about it.
176 */ 177 */
177 if (mem_range_next_free >= 178 if (mem_range_next_free >= ARRAY_SIZE(mem_range_cache))
178 (sizeof(mem_range_cache) / sizeof(mem_range_cache[0])))
179 panic("Physical memory map too complex!\n"); 179 panic("Physical memory map too complex!\n");
180 180
181 new = &mem_range_cache[mem_range_next_free++]; 181 new = &mem_range_cache[mem_range_next_free++];