Skip to contentSkip to conversation

x86/microcode/amd: Remove unneeded pointer arithmetic

PATCH Applied Nathan Fontenot 2 participants 2 messages May 2, 2023 – May 8, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/microcode/amd: Remove unneeded pointer arithmetic

From: Nathan Fontenot <[email protected]>

Remove unneeded pointer increment arithmetic, the pointer is set at the beginning of the loop.

---
 arch/x86/kernel/cpu/microcode/amd.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/cpu/microcode/amd.c +0 -2
index f5fdeb1e3606..0f7cbc2f3a95 100644
@@ -78,8 +78,6 @@ static u16 find_equiv_id(struct equiv_cpu_table *et, u32 sig)
 
 		if (sig == e->installed_cpu)
 			return e->equiv_cpu;
-
-		e++;
 	}
 	return 0;
 }
Signature · 1 line
2.25.1
#1 lore raw
The following commit has been merged into the x86/microcode branch of tip:

The following commit has been merged into the x86/microcode branch of tip:

Commit-ID:     e281d5cad1f3924edf1042441b98c25204ae0def
Gitweb:        https://git.kernel.org/tip/e281d5cad1f3924edf1042441b98c25204ae0def
Author:        Nathan Fontenot <[email protected]>
AuthorDate:    Tue, 02 May 2023 12:42:32 -05:00
Committer:     Borislav Petkov (AMD) <[email protected]>
CommitterDate: Mon, 08 May 2023 14:38:38 +02:00

x86/microcode/amd: Remove unneeded pointer arithmetic

Remove unneeded pointer increment arithmetic, the pointer is set at the beginning of the loop.

---
 arch/x86/kernel/cpu/microcode/amd.c | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kernel/cpu/microcode/amd.c +0 -2
index dd33ee8..f14f4ea 100644
@@ -78,8 +78,6 @@ static u16 find_equiv_id(struct equiv_cpu_table *et, u32 sig)
 
 		if (sig == e->installed_cpu)
 			return e->equiv_cpu;
-
-		e++;
 	}
 	return 0;
 }