[PATCH] x86/microcode/amd: Remove unneeded pointer arithmetic

Nathan Fontenot posted 1 patch 2 years, 7 months ago
There is a newer version of this series
arch/x86/kernel/cpu/microcode/amd.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] x86/microcode/amd: Remove unneeded pointer arithmetic
Posted by Nathan Fontenot 2 years, 7 months ago
From: Nathan Fontenot <nathan.fontenot@amd.com>

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

Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com>
---
 arch/x86/kernel/cpu/microcode/amd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index f5fdeb1e3606..0f7cbc2f3a95 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -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;
 }
-- 
2.25.1
[tip: x86/microcode] x86/microcode/amd: Remove unneeded pointer arithmetic
Posted by tip-bot2 for Nathan Fontenot 2 years, 7 months ago
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 <nathan.fontenot@amd.com>
AuthorDate:    Tue, 02 May 2023 12:42:32 -05:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
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.

Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230502174232.73880-1-nathan.fontenot@amd.com
---
 arch/x86/kernel/cpu/microcode/amd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index dd33ee8..f14f4ea 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -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;
 }