X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Fsys_ruffian.c;h=5b99cf3cd69cb3be72cf733d10f14885feb74f66;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=78c30decf3ff421844939caf51270dff81dda592;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/arch/alpha/kernel/sys_ruffian.c b/arch/alpha/kernel/sys_ruffian.c index 78c30decf..5b99cf3cd 100644 --- a/arch/alpha/kernel/sys_ruffian.c +++ b/arch/alpha/kernel/sys_ruffian.c @@ -182,16 +182,16 @@ static unsigned long __init ruffian_get_bank_size(unsigned long offset) { unsigned long bank_addr, bank, ret = 0; - + /* Valid offsets are: 0x800, 0x840 and 0x880 since Ruffian only uses three banks. */ bank_addr = (unsigned long)PYXIS_MCR + offset; bank = *(vulp)bank_addr; - + /* Check BANK_ENABLE */ if (bank & 0x01) { static unsigned long size[] __initdata = { - 0x40000000UL, /* 0x00, 1G */ + 0x40000000UL, /* 0x00, 1G */ 0x20000000UL, /* 0x02, 512M */ 0x10000000UL, /* 0x04, 256M */ 0x08000000UL, /* 0x06, 128M */ @@ -203,7 +203,7 @@ ruffian_get_bank_size(unsigned long offset) }; bank = (bank & 0x1e) >> 1; - if (bank < sizeof(size)/sizeof(*size)) + if (bank < ARRAY_SIZE(size)) ret = size[bank]; }