Skip to content

Commit 5b9d292

Browse files
yghannambp3tk0v
authored andcommitted
x86/mce: Remove unused variable and return value in machine_check_poll()
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: 3ed57b4 ("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>
1 parent ede1898 commit 5b9d292

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

arch/x86/include/asm/mce.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ enum mcp_flags {
261261
MCP_DONTLOG = BIT(2), /* only clear, don't log */
262262
MCP_QUEUE_LOG = BIT(3), /* only queue to genpool */
263263
};
264-
bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
264+
265+
void machine_check_poll(enum mcp_flags flags, mce_banks_t *b);
265266

266267
int mce_notify_irq(void);
267268

arch/x86/kernel/cpu/mce/core.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -677,10 +677,9 @@ DEFINE_PER_CPU(unsigned, mce_poll_count);
677677
* is already totally * confused. In this case it's likely it will
678678
* not fully execute the machine check handler either.
679679
*/
680-
bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
680+
void machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
681681
{
682682
struct mce_bank *mce_banks = this_cpu_ptr(mce_banks_array);
683-
bool error_seen = false;
684683
struct mce m;
685684
int i;
686685

@@ -754,8 +753,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
754753
continue;
755754

756755
log_it:
757-
error_seen = true;
758-
759756
if (flags & MCP_DONTLOG)
760757
goto clear_it;
761758

@@ -787,8 +784,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
787784
*/
788785

789786
sync_core();
790-
791-
return error_seen;
792787
}
793788
EXPORT_SYMBOL_GPL(machine_check_poll);
794789

0 commit comments

Comments
 (0)