x86/microcode/AMD: Clean up find_equiv_id()
No need to have it marked "inline" - let gcc decide. Also, shorten the argument name and simplify while-test. While at it, make it into a proper for-loop and simplify it even more, as tglx suggests. No functionality change. Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/20170120202955.4091-5-bp@alien8.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

committed by
Thomas Gleixner

parent
0c12d18ab9
commit
1f02ac0682
@@ -97,20 +97,13 @@ static size_t compute_container_size(u8 *data, u32 total_size)
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline u16 find_equiv_id(struct equiv_cpu_entry *equiv_cpu_table,
|
static u16 find_equiv_id(struct equiv_cpu_entry *equiv_table, u32 sig)
|
||||||
unsigned int sig)
|
|
||||||
{
|
{
|
||||||
int i = 0;
|
for (; equiv_table && equiv_table->installed_cpu; equiv_table++) {
|
||||||
|
if (sig == equiv_table->installed_cpu)
|
||||||
if (!equiv_cpu_table)
|
return equiv_table->equiv_cpu;
|
||||||
return 0;
|
|
||||||
|
|
||||||
while (equiv_cpu_table[i].installed_cpu != 0) {
|
|
||||||
if (sig == equiv_cpu_table[i].installed_cpu)
|
|
||||||
return equiv_cpu_table[i].equiv_cpu;
|
|
||||||
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user