From nobody Mon Sep 8 16:19:32 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1344AC64ED8 for ; Mon, 27 Feb 2023 16:04:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjB0QEE (ORCPT ); Mon, 27 Feb 2023 11:04:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230001AbjB0QEB (ORCPT ); Mon, 27 Feb 2023 11:04:01 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC5B6211DB for ; Mon, 27 Feb 2023 08:03:59 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 585B81EC0445; Mon, 27 Feb 2023 17:03:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1677513838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=xb92flm1mV65M/epWOlUCTlYcJPYupP7yUsQn3lXFys=; b=FmFpvGOxijWN46kpo9qSF+Mg1YcnP02RT6us2kwo8duEAC34WP/qGV3A3t+svFtKqwTIhX iAzcpHv7bxvdspc8w2b+MmfHVcxBebpsPeAzkBmku2P3KirGDS1tvJEsyI9ZuTlYmX3PZ+ iq3f4PHdoxRVF95CYfMOMpNl2AAqiv4= From: Borislav Petkov To: X86 ML Cc: LKML Subject: [PATCH] x86/microcode/AMD: Get rid of __find_equiv_id() Date: Mon, 27 Feb 2023 17:03:52 +0100 Message-Id: <20230227160352.7260-1-bp@alien8.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: "Borislav Petkov (AMD)" Merge it into its only call site. No functional changes. Signed-off-by: Borislav Petkov (AMD) --- arch/x86/kernel/cpu/microcode/amd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/micr= ocode/amd.c index 9eb457b10341..394a9e16d5ee 100644 --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -596,11 +596,6 @@ void reload_ucode_amd(unsigned int cpu) } } } -static u16 __find_equiv_id(unsigned int cpu) -{ - struct ucode_cpu_info *uci =3D ucode_cpu_info + cpu; - return find_equiv_id(&equiv_table, uci->cpu_sig.sig); -} =20 /* * a small, trivial cache of per-family ucode patches @@ -651,9 +646,11 @@ static void free_cache(void) =20 static struct ucode_patch *find_patch(unsigned int cpu) { + struct ucode_cpu_info *uci =3D ucode_cpu_info + cpu; u16 equiv_id; =20 - equiv_id =3D __find_equiv_id(cpu); + + equiv_id =3D find_equiv_id(&equiv_table, uci->cpu_sig.sig); if (!equiv_id) return NULL; =20 --=20 2.35.1