Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1456030ybb; Thu, 9 Apr 2020 02:28:26 -0700 (PDT) X-Google-Smtp-Source: APiQypKAjb0LW1GW54zN9SziLnMVDaJO9i1c2zVLEywacTJXb4gFxq2OYQzTNSI+4cDHLphPpeOS X-Received: by 2002:aca:cf48:: with SMTP id f69mr5105764oig.122.1586424506783; Thu, 09 Apr 2020 02:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586424506; cv=none; d=google.com; s=arc-20160816; b=l4Ki4rRxmcQVlAeNj7oh80MK6sgdRcPIPLmm8vDs0usBvSxXEFu84P2v+X1tvYoyk5 j5KCGz9lPvQxSo7n33dLWYB+x465IH2rvIi1qlRrR2D/fPzk/LkBBfU6YDRaw80uYmje qewoupu4rSb4PesACt1uAuJwFsSc67cW+j65VVzDbg3aE7UN4MDdm8r7TKCxLZ4ZqgdB Vqjk+N20ByuU/9x0b/CR+cLiJ3YYv+/lP9AbZl94bvJMrO/dFJCLnxVanGJm9SWbkJgw IwkUOnDfsapL7PiDnwxt4/uP/rH18W2S6/rUUMeJhnteFgSCDuaVBVyXMPXDYYnN1okC g8Gg== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=HAnQ2849Rv54ckHfACy9hTxfjvIA4QZAvTSpzh5vt9k=; b=bz/BDKGqpjyQdBhm0iV5INfxjDy69zjdlpexg0zAQbvvIr5CMhe2TJ6R6PgF2yi4+l TRWY3pmT0YQz73Mr8RlZOOvs5aN8zXobTzJ/kHaoN9+2/c///EuGf6D/sJsSVameN89l ME0SamXMX4peuw4sNlkHEKHaP0099pEp74jo07HOfzwxNXmrID+OOUbBS0GRkNCXFJfh MjKRmdsTumIPt5YimEWhBZA+whwroO8Nw5z35ZmMAI0Y0Ri3LCF19UXAa3s48UUkEJoL 3KPkbPi+K3KHDiuTPhlM9GctgDHZqMNDiw/gTR8hpHF1vPtT0DbWqSMHiqN/HYzG3Zcj fZvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TLFe7cjI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v126si2927586oia.106.2020.04.09.02.28.12; Thu, 09 Apr 2020 02:28:26 -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; dkim=pass header.i=@kernel.org header.s=default header.b=TLFe7cjI; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726574AbgDIJ1W (ORCPT + 99 others); Thu, 9 Apr 2020 05:27:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:43082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725783AbgDIJ1W (ORCPT ); Thu, 9 Apr 2020 05:27:22 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1A3BD2084D; Thu, 9 Apr 2020 09:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586424442; bh=HatT2IdEBwyftwxp9Qj7Ct8wNjI44BrpEB0SS+p2Wvc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=TLFe7cjISdDfygUXXw4Y6MFcf5o9XaOAqzIq9ONFlagDTpgXEeRc4gFBW9ptsjv8x UIhFV3rYUZtIKwNrwy/3GJGODr+7nxupmFqxAr1HTXRv+sT1RuhlWvZE+Zo4yhYD0g zGLj+0PWfupBIrp+Xl2z4GJR5YYgTjYoeoFrTpQA= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMTSy-001rhe-AC; Thu, 09 Apr 2020 10:27:20 +0100 Date: Thu, 9 Apr 2020 10:27:18 +0100 From: Marc Zyngier To: Zenghui Yu Cc: , , , , Subject: Re: [PATCH] irqchip/mbigen: Free msi_desc on device teardown Message-ID: <20200409102718.73875cd9@why> In-Reply-To: <20200408114352.1604-1-yuzenghui@huawei.com> References: <20200408114352.1604-1-yuzenghui@huawei.com> Organization: Approximate X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: yuzenghui@huawei.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, wuyun.wu@huawei.com, wanghaibin.wang@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Apr 2020 19:43:52 +0800 Zenghui Yu wrote: Hi Zenghui, > 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. > > Signed-off-by: Zenghui Yu > --- > 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 6b566bba263b..ff7627b57772 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, Should this deserve a: Fixes: 9650c60ebfec0 ("irqchip/mbigen: Create irq domain for each mbigen device") Otherwise queued for post -rc1. Thanks, M. -- Jazz is not dead. It just smells funny...