x86: ARRAY_SIZE cleanup

Signed-off-by: Alejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Alejandro Martinez Ruiz 2007-10-17 14:38:58 +02:00 committed by Thomas Gleixner
parent 8c66006538
commit 4d022adab4
2 changed files with 3 additions and 5 deletions

View file

@ -38,11 +38,9 @@ static const char* safe_abs_relocs[] = {
static int is_safe_abs_reloc(const char* sym_name)
{
int i, array_size;
int i;
array_size = sizeof(safe_abs_relocs)/sizeof(char*);
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;

View file

@ -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]);
/*