Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp384410ybz; Fri, 17 Apr 2020 02:59:04 -0700 (PDT) X-Google-Smtp-Source: APiQypK9fzJxyDL5BEeazLzeIxItleD8DkPDZOtsKmG2a6qHo+580KsyRjhjsezHRPQOvt2dutL9 X-Received: by 2002:a17:906:6d83:: with SMTP id h3mr2244086ejt.85.1587117543904; Fri, 17 Apr 2020 02:59:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587117543; cv=none; d=google.com; s=arc-20160816; b=K8/OsRFOG4298SEAUUvSVYSScMzNFdrtDkOK06YjWp+UnEICuE9qCXRlw+qeCNAfeK WJCqc/kSKAx3zngMaW6ooVzWz9cKvxEZvLgtyQL2VMwwXetxRAElsMn5zBfWOmK2UGfq pj0Py8YrI31+zh9L3Eo6FVOFAWr6lTk7erXnrItXo5ys2yJ3TdbFlz1xf/xeE49QQ2Y1 wD/VtAK5BbDbB7ZxlchUDdEQXrO2yvOSqRSyx5Ibec99g+JQzPwhkaGZWAJPt0pC8qFn 9pYw/Df//4l+R0ceFfFpSN9X8PDPJ67DcAUNpT+oq3L78+IP8fzpQFYpWlQ7yVcHRd2H lWAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=C9cg3+Ibw1jgSK6ajhnhyfU2+IG1OfNdjGpviFlNe6A=; b=fcvlH847MdXxPYQcN4Mu3wY70xU9pPHG3A/K9TVMy2kz58qRD6yeVewl1FYYn0E3Np 2tQAFtfhJ7PYoDspelNntZyznAxBlLRaYx84A5J3VVkmP4UZJC7CMjbtDYxWaX+elCof f8JUJtQMR2llR1N8sTRAuWf1F/L+tm06kYUoMi2Iid84katEE9SfmOh/lJhsL3zoZ+p6 0b4vgWRp712Apy8kHA+Hag5SLKffIwyrF7v9E8pbJ5Z2N3pD12UdPe1uZq5p9jrH72y5 IRzQITz4ASqPlwWkF6YB95C2SeXCLbr96BLaXdDJT3kcObEzp2yyf2w5RMYgSyX4ZyDb l/lA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si8935334edr.462.2020.04.17.02.58.40; Fri, 17 Apr 2020 02:59:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728537AbgDQJ5H (ORCPT + 99 others); Fri, 17 Apr 2020 05:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727974AbgDQJ4t (ORCPT ); Fri, 17 Apr 2020 05:56:49 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF98C061A0F; Fri, 17 Apr 2020 02:56:49 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jPNjp-0005fQ-T2; Fri, 17 Apr 2020 11:56:46 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 7C6851C03A9; Fri, 17 Apr 2020 11:56:45 +0200 (CEST) Date: Fri, 17 Apr 2020 09:56:45 -0000 From: "tip-bot2 for Zenghui Yu" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] irqchip/mbigen: Free msi_desc on device teardown Cc: Zenghui Yu , Marc Zyngier , x86 , LKML In-Reply-To: <20200408114352.1604-1-yuzenghui@huawei.com> References: <20200408114352.1604-1-yuzenghui@huawei.com> MIME-Version: 1.0 Message-ID: <158711740513.28353.15906333414276185307.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org 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: edfc23f6f9fdbd7825d50ac1f380243cde19b679 Gitweb: https://git.kernel.org/tip/edfc23f6f9fdbd7825d50ac1f380243cde19b679 Author: Zenghui Yu AuthorDate: Wed, 08 Apr 2020 19:43:52 +08:00 Committer: Marc Zyngier CommitterDate: Fri, 17 Apr 2020 08:59:27 +01:00 irqchip/mbigen: Free msi_desc on device teardown Using irq_domain_free_irqs_common() on the irqdomain free path will leave the MSI descriptor unfreed when platform devices get removed. Properly free it by MSI domain free function. Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each mbigen device") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200408114352.1604-1-yuzenghui@huawei.com --- drivers/irqchip/irq-mbigen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c index 6b566bb..ff7627b 100644 --- a/drivers/irqchip/irq-mbigen.c +++ b/drivers/irqchip/irq-mbigen.c @@ -220,10 +220,16 @@ static int mbigen_irq_domain_alloc(struct irq_domain *domain, return 0; } +static void mbigen_irq_domain_free(struct irq_domain *domain, unsigned int virq, + unsigned int nr_irqs) +{ + platform_msi_domain_free(domain, virq, nr_irqs); +} + static const struct irq_domain_ops mbigen_domain_ops = { .translate = mbigen_domain_translate, .alloc = mbigen_irq_domain_alloc, - .free = irq_domain_free_irqs_common, + .free = mbigen_irq_domain_free, }; static int mbigen_of_create_domain(struct platform_device *pdev,