From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C55CC19F2A for ; Sat, 30 Jul 2022 20:08:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eA7zIl11fx07h3lcwMNYc+y4RMNcqZAjCRQR0IbBZQk=; b=CD0hFZ7/E5ku3V lsPZipjID30WhbXtGVwpaHRfzBY/8vy1+IVRNCc5wRjFeeER0yMXTA6Z3HzM4m/XJ1jM2exjhPDzy A6BY+etxIrVcv9nHd4YiyOd/28zzd1i6g9C7x8AFA9eTdYNKLRMnKx58LTMYUHp8EX95iMOmEzoCC xuGiEcw5Qj5wbtC8joAutWXvVAJlBRY9svhQ3rH+QBb0DduwBGLL6HcPlZQExLO4yJ+N5YOxIVYUt TfSMjbKVV+ffGL8+1jGCTK9JLc8iDXgAtuNOdP3+uRwtiJ6vbdgXADnQ4wuOdq57Ite9HjoKfu+MW uaTZDW7U8kKJQFpIWgAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHskH-0041hs-35; Sat, 30 Jul 2022 20:07:33 +0000 Received: from mga03.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHskD-0041dh-RO for linux-arm-kernel@lists.infradead.org; Sat, 30 Jul 2022 20:07:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659211649; x=1690747649; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=qVvlkCYGySw576yQ2Em/mAMLb51VdX062dlKlXivK7E=; b=ZTepO+U/HmNbLGIkAeMVdKvj0wqBAG7c0FgAtzsINC8u/qlmRefOxUmy 312BmctnsVm0uYopwmmGAmoZodDesmo5u+IVrKbUK6HimgMtlFN2PEQdc ScBFfRzUO3QiE3uZ6d2RQFoMdHuVKWHOB08k4qRR+yhel8/MUE4eKn6MT 8TjPvHaX7Dp1EIp+DoituZeb3oW1rNOqi6kLRnc51q5TH8eoXmdasIaZY vpcaKymCeOGLSivRLyt7FCeloXLUtSRXDIbo5LkP2W/tyBdp80pU6rMFI a6vxIes1FUOsk56Mf6P+E0lPdoUnPQMh8mp+3fJgOsfo3EeBViDPIONmh w==; X-IronPort-AV: E=McAfee;i="6400,9594,10424"; a="290149480" X-IronPort-AV: E=Sophos;i="5.93,204,1654585200"; d="scan'208";a="290149480" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2022 13:07:22 -0700 X-IronPort-AV: E=Sophos;i="5.93,204,1654585200"; d="scan'208";a="577321545" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2022 13:07:18 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oHsjz-001fWn-1J; Sat, 30 Jul 2022 23:07:15 +0300 Date: Sat, 30 Jul 2022 23:07:15 +0300 From: Andy Shevchenko To: Christophe JAILLET Cc: vee.khee.wong@intel.com, weifeng.voon@intel.com, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] stmmac: intel: Simplify intel_eth_pci_remove() Message-ID: References: <9f82d58aa4a6c34ec3c734399a4792d3aa23297f.1659204745.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <9f82d58aa4a6c34ec3c734399a4792d3aa23297f.1659204745.git.christophe.jaillet@wanadoo.fr> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220730_130729_951611_E6E25A2B X-CRM114-Status: GOOD ( 20.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, Jul 30, 2022 at 08:20:02PM +0200, Christophe JAILLET wrote: > There is no point to call pcim_iounmap_regions() in the remove function, > this frees a managed resource that would be release by the framework > anyway. The patch is fully correct in my opinion. The iounmap() is called exactly in the same order as if it's done implicitly by managed resources handlers, hence no need to explicitly call it. Reviewed-by: Andy Shevchenko > Signed-off-by: Christophe JAILLET > --- > This patch is speculative. > Sometimes the order of releasing managed resources is tricky. > > Just a few drivers have this pattern, while many call pcim_iomap_regions(). > If I'm right and this patch is reviewed and merged, I'll look at the > other files if they also can be simplified a bit. > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > index 9f38642f86ce..f68d23051557 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > @@ -1136,8 +1136,6 @@ static void intel_eth_pci_remove(struct pci_dev *pdev) > > clk_disable_unprepare(plat->stmmac_clk); > clk_unregister_fixed_rate(priv->plat->stmmac_clk); > - > - pcim_iounmap_regions(pdev, BIT(0)); > } > > static int __maybe_unused intel_eth_pci_suspend(struct device *dev) > -- > 2.34.1 > -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel