From: Ahmed S. Darwish Date: Mon, 5 Feb 2007 02:41:27 +0000 (+0200) Subject: [AVR32] Use ARRAY_SIZE macro when appropriate X-Git-Tag: v2.6.21-rc1~83^2~63^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=10b50b7dd2716b944299d45452d0875dbeb5f0c2;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Haavard Skinnemoen --- diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index a3421160100..c6734aefb55 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -174,8 +175,7 @@ static int __init parse_tag_mem_range(struct tag *tag, * Copy the data so the bootmem init code doesn't need to care * about it. */ - if (mem_range_next_free >= - (sizeof(mem_range_cache) / sizeof(mem_range_cache[0]))) + if (mem_range_next_free >= ARRAY_SIZE(mem_range_cache)) panic("Physical memory map too complex!\n"); new = &mem_range_cache[mem_range_next_free++];