Commit 4d022ada authored by Alejandro Martinez Ruiz's avatar Alejandro Martinez Ruiz Committed by Thomas Gleixner

x86: ARRAY_SIZE cleanup

Signed-off-by: default avatarAlejandro Martinez Ruiz <alex@flawedcode.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 8c660065
...@@ -38,11 +38,9 @@ static const char* safe_abs_relocs[] = { ...@@ -38,11 +38,9 @@ static const char* safe_abs_relocs[] = {
static int is_safe_abs_reloc(const char* sym_name) 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])) if (!strcmp(sym_name, safe_abs_relocs[i]))
/* Match found */ /* Match found */
return 1; return 1;
......
...@@ -388,7 +388,7 @@ static void inquire_remote_apic(int apicid) ...@@ -388,7 +388,7 @@ static void inquire_remote_apic(int apicid)
printk(KERN_INFO "Inquiring remote APIC #%d...\n", 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]); printk("... APIC #%d %s: ", apicid, names[i]);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment