diff options
-rw-r--r-- | arch/mips/mips-boards/malta/malta_int.c | 2 | ||||
-rw-r--r-- | arch/mips/sgi-ip22/ip28-berr.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 8c495104b321..4b5694e19d33 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c | |||
@@ -527,7 +527,7 @@ void __init arch_init_irq(void) | |||
527 | .call = GIC_IPI_EXT_INTR_CALLFNC_VPE3 | 527 | .call = GIC_IPI_EXT_INTR_CALLFNC_VPE3 |
528 | } | 528 | } |
529 | }; | 529 | }; |
530 | #define NIPI (sizeof(ipiirq)/sizeof(ipiirq[0])) | 530 | #define NIPI ARRAY_SIZE(ipiirq) |
531 | fill_ipi_map(); | 531 | fill_ipi_map(); |
532 | gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map, ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE); | 532 | gic_init(GIC_BASE_ADDR, GIC_ADDRSPACE_SZ, gic_intr_map, ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE); |
533 | if (!gcmp_present) { | 533 | if (!gcmp_present) { |
diff --git a/arch/mips/sgi-ip22/ip28-berr.c b/arch/mips/sgi-ip22/ip28-berr.c index 30e12e2ec4b5..fee7a2e0e538 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) | |||
412 | * Now we have an asynchronous bus error, speculatively or DMA caused. | 412 | * Now we have an asynchronous bus error, speculatively or DMA caused. |
413 | * Need to search all DMA descriptors for the error address. | 413 | * Need to search all DMA descriptors for the error address. |
414 | */ | 414 | */ |
415 | for (i = 0; i < sizeof(hpc3)/sizeof(struct hpc3_stat); ++i) { | 415 | for (i = 0; i < ARRAY_SIZE(hpc3); ++i) { |
416 | struct hpc3_stat *hp = (struct hpc3_stat *)&hpc3 + i; | 416 | struct hpc3_stat *hp = (struct hpc3_stat *)&hpc3 + i; |
417 | if ((cpu_err_stat & CPU_ERRMASK) && | 417 | if ((cpu_err_stat & CPU_ERRMASK) && |
418 | (cpu_err_addr == hp->ndptr || cpu_err_addr == hp->cbp)) | 418 | (cpu_err_addr == hp->ndptr || cpu_err_addr == hp->cbp)) |
@@ -421,7 +421,7 @@ static int ip28_be_interrupt(const struct pt_regs *regs) | |||
421 | (gio_err_addr == hp->ndptr || gio_err_addr == hp->cbp)) | 421 | (gio_err_addr == hp->ndptr || gio_err_addr == hp->cbp)) |
422 | break; | 422 | break; |
423 | } | 423 | } |
424 | if (i < sizeof(hpc3)/sizeof(struct hpc3_stat)) { | 424 | if (i < ARRAY_SIZE(hpc3)) { |
425 | struct hpc3_stat *hp = (struct hpc3_stat *)&hpc3 + i; | 425 | struct hpc3_stat *hp = (struct hpc3_stat *)&hpc3 + i; |
426 | printk(KERN_ERR "at DMA addresses: HPC3 @ %08lx:" | 426 | printk(KERN_ERR "at DMA addresses: HPC3 @ %08lx:" |
427 | " ctl %08x, ndp %08x, cbp %08x\n", | 427 | " ctl %08x, ndp %08x, cbp %08x\n", |