Received: by 10.192.165.156 with SMTP id m28csp62789imm; Tue, 10 Apr 2018 16:27:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx489pkQM+7MMZBk2oJ+cE+kIUvLrOv4sGy+jlgH9ZgejVuJo8JBosbm7X5He67Gr3KjsjS95 X-Received: by 10.98.141.78 with SMTP id z75mr1985385pfd.174.1523402827533; Tue, 10 Apr 2018 16:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523402827; cv=none; d=google.com; s=arc-20160816; b=ZQlqtSMDoQwVye563+x7o5EwV0zeP5OJnzBuTwD1NfO7i4InTUYG8CiIZmXrO7ZSkw elpEj1zisYdLapWHuaSj+y5Kzks4ACoGH0aFDlIY1nuKywxVtLeyVoKl3QEvy4B8p4M8 LopRlC70qM9N2cvI/7z2MUXOGAKvlBc2y0CbQpMItx2lAAVYvi5ZM8mDJs5DiE1M3pGU WdUTsAPThv0sj4dycKoamWhPxyX/nQR94M+YXwmpAT5mIfHKMNqsNG255zFtE4tvlCv8 CTf3ZRGHpKugst/f6cFkooeEk+Knu0zxRcph8PJUCj2WmKf6usiThnJC+BV0wGgD0IQX TfjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YLwWVbaX8czuwAyU9IJFLvV2ViHS2ivh8pbMsrJx9X8=; b=NEpX4vtpkFJkaiDDoeOvnXedLd1aDafM475LZZH7T0TNaKGNHr3jqgRXV/Lcp0XRNd Ph7HEdVoP2Lt39z0nX5fCtVRnox2IUBnn5k0fbaZZh9+5cQRoWNUdsdLaTxqI1DxiOSC cTBiEhKtQ6hoVi455jR2DhVYEXzokB+9sqoG3W3xWETvGZTvDkmsDedXPcH0bmNWpD63 sZoX5RB2hjTNrqPofDs3uvM+6nqQ+ueTG/GqThWW8DtmL8xBOe/TiMri+/RQVRkyJ0X+ x7M2YqZhcaHZFOWsGuBfjZ6rTq2ucSeNFOt4Wl96vMTY9Z66v7dscDdcp3a+1wm0dAf5 3F7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7si2365735pgq.426.2018.04.10.16.26.29; Tue, 10 Apr 2018 16:27:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbeDJXUl (ORCPT + 99 others); Tue, 10 Apr 2018 19:20:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40168 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754680AbeDJWav (ORCPT ); Tue, 10 Apr 2018 18:30:51 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5136FDF3; Tue, 10 Apr 2018 22:30:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Borislav Petkov , Thomas Gleixner , Tom Lendacky , Ashok Raj , Arjan Van De Ven Subject: [PATCH 4.15 112/168] x86/microcode: Get rid of struct apply_microcode_ctx Date: Wed, 11 Apr 2018 00:24:14 +0200 Message-Id: <20180410212805.041379171@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Borislav Petkov commit 854857f5944c59a881ff607b37ed9ed41d031a3b upstream. It is a useless remnant from earlier times. Use the ucode_state enum directly. No functional change. Signed-off-by: Borislav Petkov Signed-off-by: Thomas Gleixner Tested-by: Tom Lendacky Tested-by: Ashok Raj Cc: Arjan Van De Ven Link: https://lkml.kernel.org/r/20180228102846.13447-2-bp@alien8.de Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/microcode/core.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) --- a/arch/x86/kernel/cpu/microcode/core.c +++ b/arch/x86/kernel/cpu/microcode/core.c @@ -373,26 +373,23 @@ static int collect_cpu_info(int cpu) return ret; } -struct apply_microcode_ctx { - enum ucode_state err; -}; - static void apply_microcode_local(void *arg) { - struct apply_microcode_ctx *ctx = arg; + enum ucode_state *err = arg; - ctx->err = microcode_ops->apply_microcode(smp_processor_id()); + *err = microcode_ops->apply_microcode(smp_processor_id()); } static int apply_microcode_on_target(int cpu) { - struct apply_microcode_ctx ctx = { .err = 0 }; + enum ucode_state err; int ret; - ret = smp_call_function_single(cpu, apply_microcode_local, &ctx, 1); - if (!ret) - ret = ctx.err; - + ret = smp_call_function_single(cpu, apply_microcode_local, &err, 1); + if (!ret) { + if (err == UCODE_ERROR) + ret = 1; + } return ret; }