Received: by 10.192.165.156 with SMTP id m28csp29194imm; Tue, 10 Apr 2018 15:43:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/66MOQfr3UKfVFqDehh0Cx6NHfxewATaQ/9DUxxxK/yjz/9RTZss8lVepUEL/KF6XoVMyh X-Received: by 10.99.119.74 with SMTP id s71mr1561327pgc.321.1523400215581; Tue, 10 Apr 2018 15:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523400215; cv=none; d=google.com; s=arc-20160816; b=Ne9jpAWuZu/naWqERtYbCVYF2buGKlOLM86QK+s/pZScsy7OV0ry7JdVfbl8Xyysjz PPr7W0uehssD/2eHefJb5GMVPmKhngxeWJej/8pm2HZNl+igFh1Ot9lLuRlpT4HlPLP8 Dm5a3YUeZVGYy23mlyuUtXEzI/Z+1IrXORa/2RcVPbDVnJhRbSt42HOk2W8XfZRwrY8l wbGLOf1fmgBT7DLjT2G5z9ycC5LXGoNoejtlVjQ5ruWMVR8sJJqt0qiTHCWGZX5GexYo bhJKOUmWnpEIkYMJzkulRIsJ1wf7XDdmM4AKlZl2V5vIC6KJXn0Qj3lEAOlFXZUYScPq iHBw== 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=feu4uUw5pqIrJCiHy43C6cWmprnPjFpyR5cQH6ZO3ug=; b=nxIqkArQ3cjHYR3tD0Y8/In8QTJcuPg4i5HAY3IwKJEjHj2gZGIewIEW361qcvF1Q2 qvphuyoZ96/D/moEUHFPNcXQ/C+NbWp56DbUDlvl/Nxt2SI5uGptmKeh3te0L4rW1n50 Nbc5ju+qXqsEb14Le1neuT/L0/JQhm/VVtk6BsrrG82B743+XlPfP9B3MgG8QXD2jdfY 7xXLs0hP5dFdih2zSWcQGKccNejEPOOn3N3teT1W+9bhKBcUnyWnFYljNYrHuw4CJflD +OxlFCrXML0Z/mx3Cojh98ieUjHVlFtW+5jLYiK41UmREOFLuBszo5CESEwcm4cq58wD d1fw== 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 l7si2341490pgp.293.2018.04.10.15.42.58; Tue, 10 Apr 2018 15:43:35 -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 S1755981AbeDJWi2 (ORCPT + 99 others); Tue, 10 Apr 2018 18:38:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44828 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755969AbeDJWi0 (ORCPT ); Tue, 10 Apr 2018 18:38:26 -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 4B11E408; Tue, 10 Apr 2018 22:38:25 +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.14 088/138] x86/microcode: Get rid of struct apply_microcode_ctx Date: Wed, 11 Apr 2018 00:24:38 +0200 Message-Id: <20180410212912.404765272@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@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.14-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; }