Linux-EDAC Archive mirror
 help / color / mirror / Atom feed
From: Yazen Ghannam <yazen.ghannam@amd.com>
To: <linux-edac@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <tony.luck@intel.com>,
	<x86@kernel.org>, <avadhut.naik@amd.com>, <john.allen@amd.com>,
	Yazen Ghannam <yazen.ghannam@amd.com>
Subject: [PATCH 2/9] x86/mce: Remove unused variable and return value in machine_check_poll()
Date: Thu, 23 May 2024 10:56:34 -0500	[thread overview]
Message-ID: <20240523155641.2805411-3-yazen.ghannam@amd.com> (raw)
In-Reply-To: <20240523155641.2805411-1-yazen.ghannam@amd.com>

The recent CMCI storm handling rework removed the last case that checks
the return value of machine_check_poll().

Therefore the "error_seen" variable is no longer used, so remove it.

Fixes: 3ed57b41a412 ("x86/mce: Remove old CMCI storm mitigation code")
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 arch/x86/include/asm/mce.h     | 3 ++-
 arch/x86/kernel/cpu/mce/core.c | 7 +------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index de3118305838..bc3813c94c79 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -259,7 +259,8 @@ enum mcp_flags {
 	MCP_DONTLOG	= BIT(2),	/* only clear, don't log */
 	MCP_QUEUE_LOG	= BIT(3),	/* only queue to genpool */
 };
-bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
+
+void machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
 
 int mce_notify_irq(void);
 
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index b5cc557cfc37..287108de210e 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -677,10 +677,9 @@ DEFINE_PER_CPU(unsigned, mce_poll_count);
  * is already totally * confused. In this case it's likely it will
  * not fully execute the machine check handler either.
  */
-bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
+void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
 {
 	struct mce_bank *mce_banks = this_cpu_ptr(mce_banks_array);
-	bool error_seen = false;
 	struct mce m;
 	int i;
 
@@ -754,8 +753,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
 		continue;
 
 log_it:
-		error_seen = true;
-
 		if (flags & MCP_DONTLOG)
 			goto clear_it;
 
@@ -787,8 +784,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
 	 */
 
 	sync_core();
-
-	return error_seen;
 }
 EXPORT_SYMBOL_GPL(machine_check_poll);
 
-- 
2.34.1


  parent reply	other threads:[~2024-05-23 15:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 15:56 [PATCH 0/9] AMD MCA interrupts rework Yazen Ghannam
2024-05-23 15:56 ` [PATCH 1/9] x86/mce/inject: Only write MCA_MISC with user-set value Yazen Ghannam
2024-05-23 15:56 ` Yazen Ghannam [this message]
2024-05-23 15:56 ` [PATCH 3/9] x86/mce: Increment MCP count only for timer calls Yazen Ghannam
2024-05-24 14:53   ` Borislav Petkov
2024-06-03 14:22     ` Yazen Ghannam
2024-06-03 15:24       ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 4/9] x86/mce: Move machine_check_poll() status checks to helper functions Yazen Ghannam
2024-06-03 17:37   ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 5/9] x86/mce: Skip AMD threshold init if no threshold banks found Yazen Ghannam
2024-05-23 15:56 ` [PATCH 6/9] x86/mce: Unify AMD THR handler with MCA Polling Yazen Ghannam
2024-06-03 18:04   ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 7/9] x86/mce: Unify AMD DFR " Yazen Ghannam
2024-06-04 11:05   ` Borislav Petkov
2024-06-04 11:18   ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 8/9] x86/mce/amd: Enable interrupt vectors once per-CPU on SMCA systems Yazen Ghannam
2024-06-04 15:46   ` Borislav Petkov
2024-05-23 15:56 ` [PATCH 9/9] x86/mce/amd: Support SMCA Corrected Error Interrupt Yazen Ghannam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240523155641.2805411-3-yazen.ghannam@amd.com \
    --to=yazen.ghannam@amd.com \
    --cc=avadhut.naik@amd.com \
    --cc=john.allen@amd.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).