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 C39CCC3DA4A for ; Mon, 19 Aug 2024 18:05:54 +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-Transfer-Encoding:Content-Type: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=Xyh4RkE+Qv6u6d3RyR/pvxJi8fW0F30QfID/bi9t+Mk=; b=AKkIzP4XTjINIgt1v+cXWBYWHD lYGe6HoPrKNS8tfpNXLq0v93W1kNvVZGPcX4MMB2CTYYXGqMSeRlszneVOarrYB9OCAuDqdX1ApY2 tvHirzGEJ6bh1BFlnyGx8+ockFsO7y9fdnDAWXXzuBTeKaSswZNkSBuQp/jr9saC9JrDxI6IT0Te7 37JGHSDH8PyNT+okeMJ09lZg1Yopt0FGzzlFszh4Htk3GeLXIkk3SgHaLsxtudCDaBTX0aD8IfmpD b1HAku7l4voiJ09tWihC4C2tdPUwTAtb6J4QmlqxvOOlZtr6MuvLMTboWI4U5OBG2R3Qt7nazjl+i XYZ5V2Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg6lC-00000002VEe-1Yt9; Mon, 19 Aug 2024 18:05:42 +0000 Received: from mgamail.intel.com ([192.198.163.14]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg6kT-00000002V0Q-2aoM for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 18:04:59 +0000 X-CSE-ConnectionGUID: wX0/TVSPTQ+i0uPaeIDGeg== X-CSE-MsgGUID: xRtOgaSxS1q8Pi1hhJW5Lw== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22533094" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="22533094" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:04:55 -0700 X-CSE-ConnectionGUID: tSCzEHZcRx6b1ETz2cciBg== X-CSE-MsgGUID: kxzUu48nQpaoQdK3Fh2GyA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="91187343" Received: from smile.fi.intel.com ([10.237.72.54]) by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2024 11:04:46 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.98) (envelope-from ) id 1sg6kC-0000000H1wA-3FW0; Mon, 19 Aug 2024 21:04:40 +0300 Date: Mon, 19 Aug 2024 21:04:40 +0300 From: Andy Shevchenko To: Philipp Stanner Cc: onathan 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?= , Jonathan Cameron , Hannes Reinecke , Damien Le Moal , Chaitanya Kulkarni , "Martin K. Petersen" , 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 4/9] block: mtip32xx: Replace deprecated PCI functions Message-ID: References: <20240819165148.58201-2-pstanner@redhat.com> <20240819165148.58201-6-pstanner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240819165148.58201-6-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-20240819_110457_693149_D6D0F67B X-CRM114-Status: GOOD ( 12.74 ) 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 Mon, Aug 19, 2024 at 06:51:44PM +0200, Philipp Stanner wrote: > 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()"). > > In mtip32xx, these functions can easily be replaced by their respective > successors, pcim_request_region() and pcim_iomap(). Moreover, the > driver's call to pcim_iounmap_regions() is not necessary, because it's > invoked in the remove() function. Cleanup can, hence, be performed by > PCI devres automatically. > > Replace pcim_iomap_regions() and pcim_iomap_table(). > > Remove the call to pcim_iounmap_regions(). ... int mtip_pci_probe() > setmask_err: > - pcim_iounmap_regions(pdev, 1 << MTIP_ABAR); > + pcim_release_region(pdev, MTIP_ABAR); But why? ... mtip_pci_remove() > pci_disable_msi(pdev); > > - pcim_iounmap_regions(pdev, 1 << MTIP_ABAR); This is okay. ... > pci_set_drvdata(pdev, NULL); Side note: This is done by driver core for the last 10+ years… -- With Best Regards, Andy Shevchenko