From patchwork Wed Nov 15 16:30:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 165466 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2656189vqg; Wed, 15 Nov 2023 08:31:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/vcoYtq62g31EoJt8v5dxkwmLYVDZAClnFB94sTe6povUSKsJfDEVF8kjYWMgippyZW8i X-Received: by 2002:a05:6a20:2588:b0:185:b481:302b with SMTP id k8-20020a056a20258800b00185b481302bmr13113034pzd.9.1700065890432; Wed, 15 Nov 2023 08:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700065890; cv=none; d=google.com; s=arc-20160816; b=D8Z2Ob1eIa+OUAx4X0vDsy3207CgLFKOFSgYFSzRhr38iGaUclbICrWyaAQlFG0mNv 6YA60rjIMOS7sumolJL1ZZ9JsZSmAjzMN4+HtL2cbMzsasrfgYSqwUHspCxqkIhYVWhA c+Mgoz/mxR+8WGw8STA+btWEjTYrwkAe3XylOTNOlZ9VqKfqmL3/iKYIaUJZLK2aiCEB VsoiVpe4dTa4Fwjr3Wsw8yED/+XHdVd+s43m+u0V00bZlowJuJzUTHFfCZLFxkfPb4YH 7DtgB9MsIzgQvhx5+T7cnm7gcXAQU1MITv9cKPhlAvJ4u4AqQU8UbzC/Nk902HKyH3uN BOwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=Lv77ghejcmK3cKE1Vf2d/yMCjFLwc48hc+VxtEjCKYI=; fh=1RdzwlqYiPIxXYjoL6EzERuHN0iFlJHyxNK6b/EOM2U=; b=P2ttDDI1FWSz/MVCLiZVmqUHVlZlK9LYjkUuc9X6p6q91dE7WFVYq+n9gWK0829ALE yDfxLTIfRy0l+nqAUTUwBzBVVrVBGzKuG3zudTi+pGhAPbgLI/L8vZLQLukVb3hUnMik wlR1MC9GxAxU2FQ0ORQtRW81kaHc7f54F80bqYu/Sorpn4M7qelKcPR/TVObUloCVBfm 93QiC3PpaJ0cbwAX3tYQSY3WxxFI8ZvD1DAFtP0xHI2p6OEM7TEQUUheuatAak61m7Mu 32n2Qw8DZ39hXFivVgbv5cDlVrNeJjeop0Q2Wx5td1XmOTcBtKZ8R/mVhJRRS7tq33Ql AZQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d4kOJKZL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l11-20020a65680b000000b005b3b8896199si10009297pgt.591.2023.11.15.08.31.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 08:31:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d4kOJKZL; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0E8A4810EC24; Wed, 15 Nov 2023 08:31:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232262AbjKOQar (ORCPT + 29 others); Wed, 15 Nov 2023 11:30:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231959AbjKOQaj (ORCPT ); Wed, 15 Nov 2023 11:30:39 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE97AAB; Wed, 15 Nov 2023 08:30:35 -0800 (PST) Date: Wed, 15 Nov 2023 16:30:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1700065833; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lv77ghejcmK3cKE1Vf2d/yMCjFLwc48hc+VxtEjCKYI=; b=d4kOJKZL+RuT9rvY+3XoqUPRRHs21qIVO+5JlejD+bj0OPqLqQSs4vjMAZDSYqpzUkWnmA zIwofycL6lG+vP0EZOhL7OSkAg9M/IJc1WHuL4GCyZvVuSY4otc+kp7h9QySLG/k+7t7Oe k1Dm1eFr5aWRfAwV+htbmNuY4OofQRoZOUiwJ9Il3Z/HC0WhuUZBfIT4xjPscGoX0rniGC ArhxzPyMzWvKN/UeT9BTj4DyfPm3nEw2yg7UciV40/zOAn6QDfa+LQ0kIeHd5dnFAoBlQy 6RmuTJSe2EgQ5M+J8w33Le67IrAZ3BOTVUQpWUon264rUBa24xe+85IJrqpxQw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1700065833; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lv77ghejcmK3cKE1Vf2d/yMCjFLwc48hc+VxtEjCKYI=; b=z/UgNWbyPqSD3nXPMQJLB7a85sgd/AbfI3VQgugkikiG9MQV4lFCwWIPWRMu6VPZ7e7meE qwM56+XuBqtYeYAw== From: "tip-bot2 for Nikolay Borisov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: ras/core] x86/mce: Remove redundant check from mce_device_create() Cc: Nikolay Borisov , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231107165529.407349-1-nik.borisov@suse.com> References: <20231107165529.407349-1-nik.borisov@suse.com> MIME-Version: 1.0 Message-ID: <170006583302.391.15327031218782517108.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 15 Nov 2023 08:31:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781925035850817757 X-GMAIL-MSGID: 1782648291346677865 The following commit has been merged into the ras/core branch of tip: Commit-ID: 612905e13b8769caca7ec4194a8aceb24efa4d5c Gitweb: https://git.kernel.org/tip/612905e13b8769caca7ec4194a8aceb24efa4d5c Author: Nikolay Borisov AuthorDate: Tue, 07 Nov 2023 18:55:29 +02:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 15 Nov 2023 17:19:14 +01:00 x86/mce: Remove redundant check from mce_device_create() mce_device_create() is called only from mce_cpu_online() which in turn will be called iff MCA support is available. That is, at the time of mce_device_create() call it's guaranteed that MCA support is available. No need to duplicate this check so remove it. [ bp: Massage commit message. ] Signed-off-by: Nikolay Borisov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231107165529.407349-1-nik.borisov@suse.com --- arch/x86/kernel/cpu/mce/core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index df8d25e..1642018 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -2584,9 +2584,6 @@ static int mce_device_create(unsigned int cpu) int err; int i, j; - if (!mce_available(&boot_cpu_data)) - return -EIO; - dev = per_cpu(mce_device, cpu); if (dev) return 0;