Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d022adab4511892226f1eae00a44502bf685ae5
Commit:     4d022adab4511892226f1eae00a44502bf685ae5
Parent:     8c660065383976f09fbdae86c33448c8da643d4e
Author:     Alejandro Martinez Ruiz <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 14:38:58 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Tue Oct 23 22:37:22 2007 +0200

    x86: ARRAY_SIZE cleanup
    
    Signed-off-by: Alejandro Martinez Ruiz <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/boot/compressed/relocs.c |    6 ++----
 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 2d77ee7..7a0d00b 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 b7e768d..500670c 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]);
 
                /*
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to