From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758322AbcGKKia (ORCPT ); Mon, 11 Jul 2016 06:38:30 -0400 Received: from foss.arm.com ([217.140.101.70]:52036 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343AbcGKKi3 (ORCPT ); Mon, 11 Jul 2016 06:38:29 -0400 Date: Mon, 11 Jul 2016 11:38:30 +0100 From: Will Deacon To: Robin Murphy Cc: Peng Fan , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq Message-ID: <20160711103829.GB17735@arm.com> References: <1467625102-9755-1-git-send-email-van.freenix@gmail.com> <578375D7.7090609@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <578375D7.7090609@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 11, 2016 at 11:32:55AM +0100, Robin Murphy wrote: > On 04/07/16 10:38, Peng Fan wrote: > > Use devm_request_irq to simplify error handling path, > > when probe smmu device. > > > > Also devm_{request|free}_irq when init or destroy domain context. > > > > Signed-off-by: Peng Fan > > Cc: Will Deacon > > Cc: Robin Murphy > > --- > [...] > > @@ -2050,7 +2046,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev) > > dev_err(dev, "removing device with active domains!\n"); > > > > for (i = 0; i < smmu->num_global_irqs; ++i) > > - free_irq(smmu->irqs[i], smmu); > > + devm_free_irq(smmu->dev, smmu->irqs[i], smmu); > > There shouldn't be any need for this at all, since the very next thing > called after drv->remove() is devres_release_all(). I already sent a pull request for this, so any further changes will need to be sent as incremental patches. Will