Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8447157a1ac467fae2125074f3693f557c8e05d3 Commit: 8447157a1ac467fae2125074f3693f557c8e05d3 Parent: 047c7c42327433a13ed2971de41ef7c6943b37ec Author: Ahmed S. Darwish <[EMAIL PROTECTED]> AuthorDate: Sat Feb 10 01:43:51 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Sun Feb 11 10:51:20 2007 -0800
[PATCH] CRIS: user ARRAY_SIZE macro when appropriate Use ARRAY_SIZE macro already defined in linux/kernel.h Signed-off-by: Ahmed S. Darwish <[EMAIL PROTECTED]> Cc: Mikael Starvik <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/cris/arch-v10/drivers/axisflashmap.c | 3 +-- arch/cris/mm/tlb.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index ffade19..efd7b0f 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c @@ -359,8 +359,7 @@ static struct mtd_info *flash_probe(void) * So we use the MTD concatenation layer instead of further * complicating the probing procedure. */ - mtd_cse = mtd_concat_create(mtds, - sizeof(mtds) / sizeof(mtds[0]), + mtd_cse = mtd_concat_create(mtds, ARRAY_SIZE(mtds), "cse0+cse1"); #else printk(KERN_ERR "%s and %s: Cannot concatenate due to kernel " diff --git a/arch/cris/mm/tlb.c b/arch/cris/mm/tlb.c index 0df390a..c4a98e2 100644 --- a/arch/cris/mm/tlb.c +++ b/arch/cris/mm/tlb.c @@ -8,6 +8,7 @@ */ #include <linux/init.h> +#include <linux/kernel.h> #include <asm/tlb.h> #define D(x) @@ -100,7 +101,7 @@ tlb_init(void) /* 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; /* invalidate the entire TLB */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html