From: Alejandro Martinez Ruiz Date: Wed, 17 Oct 2007 12:38:58 +0000 (+0200) Subject: x86: ARRAY_SIZE cleanup X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4d022adab4511892226f1eae00a44502bf685ae5;p=linux-beck.git x86: ARRAY_SIZE cleanup Signed-off-by: Alejandro Martinez Ruiz Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c index 2d77ee728f92..7a0d00b2cf28 100644 --- a/arch/x86/boot/compressed/relocs.c +++ b/arch/x86/boot/compressed/relocs.c @@ -38,11 +38,9 @@ static const char* safe_abs_relocs[] = { static int is_safe_abs_reloc(const char* sym_name) { - int i, array_size; - - array_size = sizeof(safe_abs_relocs)/sizeof(char*); + int i; - for(i = 0; i < array_size; i++) { + for(i = 0; i < ARRAY_SIZE(safe_abs_relocs); i++) { if (!strcmp(sym_name, safe_abs_relocs[i])) /* Match found */ return 1; diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c index b7e768dd87c9..500670c93d81 100644 --- a/arch/x86/kernel/smpboot_64.c +++ b/arch/x86/kernel/smpboot_64.c @@ -388,7 +388,7 @@ static void inquire_remote_apic(int apicid) printk(KERN_INFO "Inquiring remote APIC #%d...\n", apicid); - for (i = 0; i < sizeof(regs) / sizeof(*regs); i++) { + for (i = 0; i < ARRAY_SIZE(regs); i++) { printk("... APIC #%d %s: ", apicid, names[i]); /*