Commit 8447157a authored by Ahmed S. Darwish's avatar Ahmed S. Darwish Committed by Linus Torvalds

[PATCH] CRIS: user ARRAY_SIZE macro when appropriate

Use ARRAY_SIZE macro already defined in linux/kernel.h
Signed-off-by: default avatarAhmed S. Darwish <darwish.07@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 047c7c42
...@@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void) ...@@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void)
* So we use the MTD concatenation layer instead of further * So we use the MTD concatenation layer instead of further
* complicating the probing procedure. * complicating the probing procedure.
*/ */
mtd_cse = mtd_concat_create(mtds, mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds),
sizeof(mtds) / sizeof(mtds[0]),
"cse0+cse1"); "cse0+cse1");
#else #else
printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel "
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h>
#include <asm/tlb.h> #include <asm/tlb.h>
#define D(x) #define D(x)
...@@ -100,7 +101,7 @@ tlb_init(void) ...@@ -100,7 +101,7 @@ tlb_init(void)
/* clear the page_id map */ /* clear the page_id map */
for (i = 1; i < sizeof (page_id_map) / sizeof (page_id_map[0]); i++) for (i = 1; i < ARRAY_SIZE(page_id_map); i++)
page_id_map[i] = NULL; page_id_map[i] = NULL;
/* invalidate the entire TLB */ /* invalidate the entire TLB */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment