x86/mce: Remove unused variable and return value in machine_check_poll()
authorYazen Ghannam <yazen.ghannam@amd.com>
Thu, 23 May 2024 15:56:34 +0000 (10:56 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 27 May 2024 08:49:25 +0000 (10:49 +0200)
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>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240523155641.2805411-3-yazen.ghannam@amd.com
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
arch/x86/include/asm/mce.h
arch/x86/kernel/cpu/mce/core.c

index dfd2e9699bd7318010ecf6dfec7066f43005057a..3ad29b12894329731736a099cf24dadfc9221030 100644 (file)
@@ -261,7 +261,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);
 
index ad0623b659ed5b3a797a9f71605a3d7afdd5799b..b85ec7a4ec9e61761aa1f97208f949ef70f55d36 100644 (file)
@@ -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 @@ clear_it:
         */
 
        sync_core();
-
-       return error_seen;
 }
 EXPORT_SYMBOL_GPL(machine_check_poll);