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 8E3BBC52D7C for ; Thu, 22 Aug 2024 14:51:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IFxHiSfUR7b6HJkcD2cr5SjyN8O4oPZI2EQOPimQAT0=; b=Jzu+AeFwMgyyWCj4fKn9FIlsH8 fAENTdqf2Uu/DBB3f6FKK62FrbElziY0VN+uRLsTpVHqp1+8px9rwjh3COhgdewP1SvfN7wiMpdg9 NCx792spkbqN73pdsazfXZERownZoHEw3JlfJiYdbbUXE7wQRQg2ofpheIlXir5uqTGHTEk0OO28M 6TeLU7zBSJgn1ljYOdWijlRiJFbcFq1ekraeSd+/PAzr4rb7ij2ajUynKNNsSFFxcfqdChn4eE49I O48bRzIg/bh1OE3iYnRsM5QmaUEVQIS31mxdGVbOisQlFXYIF4KydrZF477jF/0j2+JLLYwff7xM5 JH9JUtgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh99y-0000000DES0-3a7I; Thu, 22 Aug 2024 14:51:34 +0000 Received: from mgamail.intel.com ([198.175.65.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sh95e-0000000DDKB-0569 for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 14:47:07 +0000 X-CSE-ConnectionGUID: GEOQwmcXS+i9fLBKMgQuRA== X-CSE-MsgGUID: iZWlqPEUR6SvDyEDED52fw== X-IronPort-AV: E=McAfee;i="6700,10204,11172"; a="40221153" X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="40221153" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2024 07:47:00 -0700 X-CSE-ConnectionGUID: uxpD/yOjR7WoWVFtANZdjQ== X-CSE-MsgGUID: 4I6lRqQgSxeEfW6ZvlId3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,167,1719903600"; d="scan'208";a="61462125" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa009.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2024 07:46:49 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1sh94p-00000000U65-0MWr; Thu, 22 Aug 2024 17:46:15 +0300 Date: Thu, 22 Aug 2024 17:46:14 +0300 From: Andy Shevchenko To: Philipp Stanner Cc: Jonathan Corbet , Jens Axboe , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , Linus Walleij , Bartosz Golaszewski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Alvaro Karsz , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , Richard Cochran , Mark Brown , David Lechner , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Damien Le Moal , Hannes Reinecke , Chaitanya Kulkarni , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fpga@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, virtualization@lists.linux.dev Subject: Re: [PATCH v3 6/9] ethernet: stmicro: Simplify PCI devres usage Message-ID: References: <20240822134744.44919-1-pstanner@redhat.com> <20240822134744.44919-7-pstanner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240822134744.44919-7-pstanner@redhat.com> 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-20240822_074706_127494_9D387D63 X-CRM114-Status: GOOD ( 14.42 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 22, 2024 at 03:47:38PM +0200, Philipp Stanner wrote: > stmicro uses PCI devres in the wrong way. Resources requested > through pcim_* functions don't need to be cleaned up manually in the > remove() callback or in the error unwind path of a probe() function. > > Moreover, there is an unnecessary loop which only requests and ioremaps > BAR 0, but iterates over all BARs nevertheless. > > Furthermore, pcim_iomap_regions() and pcim_iomap_table() have been > deprecated by the PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate > pcim_iomap_table(), pcim_iomap_regions_request_all()"). > > Replace these functions with pcim_iomap_region(). > > Remove the unnecessary manual pcim_* cleanup calls. > > Remove the unnecessary loop over all BARs. ... > - /* Get the base address of device */ > + /* Request the base address BAR of device */ It's a tautology, "BAR" == Base Address ... -- With Best Regards, Andy Shevchenko