diff options
author | Alejandro Martinez Ruiz <alex@flawedcode.org> | 2007-10-17 08:38:58 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2007-10-23 16:37:22 -0400 |
commit | 4d022adab4511892226f1eae00a44502bf685ae5 (patch) | |
tree | 23ae5685f3842ea238da8619c855ce80425f1415 /arch/x86 | |
parent | 8c660065383976f09fbdae86c33448c8da643d4e (diff) |
x86: ARRAY_SIZE cleanup
Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/boot/compressed/relocs.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot_64.c | 2 |
2 files changed, 3 insertions, 5 deletions
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[] = { | |||
38 | 38 | ||
39 | static int is_safe_abs_reloc(const char* sym_name) | 39 | static int is_safe_abs_reloc(const char* sym_name) |
40 | { | 40 | { |
41 | int i, array_size; | 41 | int i; |
42 | |||
43 | array_size = sizeof(safe_abs_relocs)/sizeof(char*); | ||
44 | 42 | ||
45 | for(i = 0; i < array_size; i++) { | 43 | for(i = 0; i < ARRAY_SIZE(safe_abs_relocs); i++) { |
46 | if (!strcmp(sym_name, safe_abs_relocs[i])) | 44 | if (!strcmp(sym_name, safe_abs_relocs[i])) |
47 | /* Match found */ | 45 | /* Match found */ |
48 | return 1; | 46 | 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) | |||
388 | 388 | ||
389 | printk(KERN_INFO "Inquiring remote APIC #%d...\n", apicid); | 389 | printk(KERN_INFO "Inquiring remote APIC #%d...\n", apicid); |
390 | 390 | ||
391 | for (i = 0; i < sizeof(regs) / sizeof(*regs); i++) { | 391 | for (i = 0; i < ARRAY_SIZE(regs); i++) { |
392 | printk("... APIC #%d %s: ", apicid, names[i]); | 392 | printk("... APIC #%d %s: ", apicid, names[i]); |
393 | 393 | ||
394 | /* | 394 | /* |