Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3841684pxb; Fri, 4 Feb 2022 18:48:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9/xGHiqv/70mX5dRK9stXmTJW0jHUOdI3xMKZehZL9NU1XtkfrM8ce6QhUmp9ylBdVx4b X-Received: by 2002:a63:d503:: with SMTP id c3mr1586513pgg.159.1644029324845; Fri, 04 Feb 2022 18:48:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644029324; cv=none; d=google.com; s=arc-20160816; b=ajkl4QzpNabi+omRnoewpIrC1suFytYAbI5CHH0Wfe72EgiJ5e+F/lIDwZ5mXz9K3b v5kmtjqsfv6ct+kbdUOq+NsGcfXVFdHnpafh6oeUhgg2L6fkdgSsPzgB0ZUnFDjpxajJ CAdzZaS9UAsSC28rsDpCEi5lGsT/XLue4j5ald9jWq03OrTJ8zrBW64hYS94jEFQhp5E 4ljtrcrIwjWthZmdSR3f+uRsq5Tj2/vm9rGBDB3hA1+qqA8Loaw1IafL3T/mHBpl/wFM zBczC+xbbshq3SDnDlCiIzDEaPCRg0+zePOPyyBKo6TlI5qyMjMmvlooTZ+vJYprp259 Mgnw== 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=KprAP9nubAD43vVJ5MtB0V2n47pzKaQf304UqJmrUl8=; b=jHBOvcfNVanyM4/NbkPxqEtdqJe8aWGkrJJ4H++BOrugaQaB6/+w1yXAICbxQQ8D7l RtkEWSVzd/ZD39sY21+ydxb0KnmEod5Wkl9Tbvr94vmFfO8I+qZj0ZfE2YkAMQlFkNvq cw3RtmnfqsAKNNbpbkNAq398//k7yQ6c3MFTKf+RcBfwL6g7Vw1oTazu1onTwrmEozNe wn+kTjM/J/NdUuT5BY7kllYcxJHmSIdNnPZAYjNBVK4dMSZhIKOeTweoy27UUhH4TFO6 M8gawLa3jSQRJrx0FCLrdyRNugCsjWw3kHhyDP3rV0roOCgMeDvv+ch5PxmnSHzSnI+L 5gmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kzU6qZX+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w186si3456688pgd.284.2022.02.04.18.48.32; Fri, 04 Feb 2022 18:48:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=kzU6qZX+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244306AbiBDI5s (ORCPT + 99 others); Fri, 4 Feb 2022 03:57:48 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:58768 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229705AbiBDI5r (ORCPT ); Fri, 4 Feb 2022 03:57:47 -0500 Date: Fri, 04 Feb 2022 08:57:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1643965066; 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=KprAP9nubAD43vVJ5MtB0V2n47pzKaQf304UqJmrUl8=; b=kzU6qZX+MFEnKhJ+SEHNzTlW8/jcBo5rlUucipWBuVtm2aIoIT4tbRwpsHMhLdxyb0LHLt qh0ygJvVgX05wuDAGtV0ostcfiQJltgZ/tBs0LNgvw1LwhlFJiuEURC+AixSQWnJ6zUuDF VXmrBn9yAz513apy/AAhL0LAYPBmMX0a/Jso9SlRsvN/Sdrv9dgEn62UtxmyiEMLZWYZwF lUHyi24rX8cUPU5xRglnLNSDvxCMUYdKxBGg4cavaXF4S7zMszQTAMWS+Cr7ROAjEfcHCj lbUz9aIBwyzc2x1JeApsOftq46mMwFFcbeFc0xTyxsP/o2/dlcZ280kxsS3LCg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1643965066; 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=KprAP9nubAD43vVJ5MtB0V2n47pzKaQf304UqJmrUl8=; b=pAE8/EyZ6yYKYWLT71cFkGNSwf2MmesZcQeheiuwut8XtkO6pnm1oQkOVc53fUGLBH0WfV xsHu/C8tWBYK+CCQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] PCI/MSI: Remove bogus warning in pci_irq_get_affinity() Cc: Guenter Roeck , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <87ee4n38sm.ffs@tglx> References: <87ee4n38sm.ffs@tglx> MIME-Version: 1.0 Message-ID: <164396506527.16921.1990922190197899743.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/urgent branch of tip: Commit-ID: dd7f5a11ac5a6f733f422dc22b4d145d3260304e Gitweb: https://git.kernel.org/tip/dd7f5a11ac5a6f733f422dc22b4d145d3260304e Author: Thomas Gleixner AuthorDate: Mon, 31 Jan 2022 22:02:46 +01:00 Committer: Thomas Gleixner CommitterDate: Fri, 04 Feb 2022 09:54:20 +01:00 PCI/MSI: Remove bogus warning in pci_irq_get_affinity() The recent overhaul of pci_irq_get_affinity() introduced a regression when pci_irq_get_affinity() is called for an MSI-X interrupt which was not allocated with affinity descriptor information. The original code just returned a NULL pointer in that case, but the rework added a WARN_ON() under the assumption that the corresponding WARN_ON() in the MSI case can be applied to MSI-X as well. In fact the MSI warning in the original code does not make sense either because it's legitimate to invoke pci_irq_get_affinity() for a MSI interrupt which was not allocated with affinity descriptor information. Remove it and just return NULL as the original code did. Fixes: f48235900182 ("PCI/MSI: Simplify pci_irq_get_affinity()") Reported-by: Guenter Roeck Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/87ee4n38sm.ffs@tglx --- drivers/pci/msi/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c index c19c7ca..9037a78 100644 --- a/drivers/pci/msi/msi.c +++ b/drivers/pci/msi/msi.c @@ -1111,7 +1111,8 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr) if (!desc) return cpu_possible_mask; - if (WARN_ON_ONCE(!desc->affinity)) + /* MSI[X] interrupts can be allocated without affinity descriptor */ + if (!desc->affinity) return NULL; /*