Loading arch/i386/kernel/apm.c +2 −3 Original line number Diff line number Diff line Loading @@ -447,8 +447,7 @@ static char * apm_event_name[] = { "system standby resume", "capabilities change" }; #define NR_APM_EVENT_NAME \ (sizeof(apm_event_name) / sizeof(apm_event_name[0])) #define NR_APM_EVENT_NAME ARRAY_SIZE(apm_event_name) typedef struct lookup_t { int key; Loading Loading @@ -479,7 +478,7 @@ static const lookup_t error_table[] = { { APM_NO_ERROR, "BIOS did not set a return code" }, { APM_NOT_PRESENT, "No APM present" } }; #define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t)) #define ERROR_COUNT ARRAY_SIZE(error_table) /** * apm_error - display an APM error Loading arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ static const struct cpu_id cpu_ids[] = { [CPU_MP4HT_D0] = {15, 3, 4 }, [CPU_MP4HT_E0] = {15, 4, 1 }, }; #define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0])) #define N_IDS ARRAY_SIZE(cpu_ids) struct cpu_model { Loading arch/i386/kernel/mca.c +1 −1 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ static struct resource mca_standard_resources[] = { { .start = 0x100, .end = 0x107, .name = "POS (MCA)" } }; #define MCA_STANDARD_RESOURCES (sizeof(mca_standard_resources)/sizeof(struct resource)) #define MCA_STANDARD_RESOURCES ARRAY_SIZE(mca_standard_resources) /** * mca_read_and_store_pos - read the POS registers into a memory buffer Loading arch/i386/kernel/reboot_fixups.c +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ void mach_reboot_fixups(void) struct pci_dev *dev; int i; for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) { for (i=0; i < ARRAY_SIZE(fixups_table); i++) { cur = &(fixups_table[i]); dev = pci_get_device(cur->vendor, cur->device, NULL); if (!dev) Loading arch/i386/kernel/smpboot.c +1 −1 Original line number Diff line number Diff line Loading @@ -612,7 +612,7 @@ static inline void __inquire_remote_apic(int apicid) printk("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]); /* Loading Loading
arch/i386/kernel/apm.c +2 −3 Original line number Diff line number Diff line Loading @@ -447,8 +447,7 @@ static char * apm_event_name[] = { "system standby resume", "capabilities change" }; #define NR_APM_EVENT_NAME \ (sizeof(apm_event_name) / sizeof(apm_event_name[0])) #define NR_APM_EVENT_NAME ARRAY_SIZE(apm_event_name) typedef struct lookup_t { int key; Loading Loading @@ -479,7 +478,7 @@ static const lookup_t error_table[] = { { APM_NO_ERROR, "BIOS did not set a return code" }, { APM_NOT_PRESENT, "No APM present" } }; #define ERROR_COUNT (sizeof(error_table)/sizeof(lookup_t)) #define ERROR_COUNT ARRAY_SIZE(error_table) /** * apm_error - display an APM error Loading
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +1 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ static const struct cpu_id cpu_ids[] = { [CPU_MP4HT_D0] = {15, 3, 4 }, [CPU_MP4HT_E0] = {15, 4, 1 }, }; #define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0])) #define N_IDS ARRAY_SIZE(cpu_ids) struct cpu_model { Loading
arch/i386/kernel/mca.c +1 −1 Original line number Diff line number Diff line Loading @@ -132,7 +132,7 @@ static struct resource mca_standard_resources[] = { { .start = 0x100, .end = 0x107, .name = "POS (MCA)" } }; #define MCA_STANDARD_RESOURCES (sizeof(mca_standard_resources)/sizeof(struct resource)) #define MCA_STANDARD_RESOURCES ARRAY_SIZE(mca_standard_resources) /** * mca_read_and_store_pos - read the POS registers into a memory buffer Loading
arch/i386/kernel/reboot_fixups.c +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ void mach_reboot_fixups(void) struct pci_dev *dev; int i; for (i=0; i < (sizeof(fixups_table)/sizeof(fixups_table[0])); i++) { for (i=0; i < ARRAY_SIZE(fixups_table); i++) { cur = &(fixups_table[i]); dev = pci_get_device(cur->vendor, cur->device, NULL); if (!dev) Loading
arch/i386/kernel/smpboot.c +1 −1 Original line number Diff line number Diff line Loading @@ -612,7 +612,7 @@ static inline void __inquire_remote_apic(int apicid) printk("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]); /* Loading