From 52f4f6bbcff5510f662a002ec1219660ea25af62 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Thu, 12 Jun 2008 15:20:05 -0400 Subject: [MIPS] Use kernel-supplied ARRAY_SIZE() macro. Signed-off-by: Robert P. J. Day Signed-off-by: Ralf Baechle --- arch/mips/sgi-ip22/ip28-berr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/mips/sgi-ip22') diff --git a/arch/mips/sgi-ip22/ip28-berr.c b/arch/mips/sgi-ip22/ip28-berr.c index 30e12e2ec4b..fee7a2e0e53 100644 --- a/arch/mips/sgi-ip22/ip28-berr.c +++ b/arch/mips/sgi-ip22/ip28-berr.c @@ -412,7 +412,7 @@ static int ip28_be_interrupt(const struct pt_regs *regs) * Now we have an asynchronous bus error, speculatively or DMA caused. * Need to search all DMA descriptors for the error address. */ - for (i = 0; i < sizeof(hpc3)/sizeof(struct hpc3_stat); ++i) { + for (i = 0; i < ARRAY_SIZE(hpc3); ++i) { struct hpc3_stat *hp = (struct hpc3_stat *)&hpc3 + i; if ((cpu_err_stat & CPU_ERRMASK) && (cpu_err_addr == hp->ndptr || cpu_err_addr == hp->cbp)) @@ -421,7 +421,7 @@ static int ip28_be_interrupt(const struct pt_regs *regs) (gio_err_addr == hp->ndptr || gio_err_addr == hp->cbp)) break; } - if (i < sizeof(hpc3)/sizeof(struct hpc3_stat)) { + if (i < ARRAY_SIZE(hpc3)) { struct hpc3_stat *hp = (struct hpc3_stat *)&hpc3 + i; printk(KERN_ERR "at DMA addresses: HPC3 @ %08lx:" " ctl %08x, ndp %08x, cbp %08x\n", -- cgit v1.2.3