diff mbox series

[RFC,2/2] x86/mce: Simplify code in log_and_reset_block()

Message ID 20220217141609.119453-3-Smita.KoralahalliChannabasappa@amd.com (mailing list archive)
State New, archived
Headers show
Series Handle AMD threshold interrupt storms | expand

Commit Message

Smita Koralahalli Feb. 17, 2022, 2:16 p.m. UTC
Reuse the existing _reset_block() to reset the threshold block after
logging error in log_and_reset_block().

Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
---
 arch/x86/kernel/cpu/mce/amd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index 53d9320d1470..823733468973 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -960,7 +960,6 @@  static void log_error_thresholding(unsigned int bank, u64 misc)
 
 static void log_and_reset_block(struct threshold_block *block)
 {
-	struct thresh_restart tr;
 	u32 low = 0, high = 0;
 
 	if (!block)
@@ -976,9 +975,7 @@  static void log_and_reset_block(struct threshold_block *block)
 	log_error_thresholding(block->bank, ((u64)high << 32) | low);
 
 	/* Reset threshold block after logging error. */
-	memset(&tr, 0, sizeof(tr));
-	tr.b = block;
-	threshold_restart_bank(&tr);
+	_reset_block(block);
 }
 
 /*