From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 199D317C98C; Mon, 19 Aug 2024 18:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724090699; cv=none; b=lDbA0Tp6Z1QaGYjRBTBWka/By3N5N3LbY6LwOKvBDS11cNd58x4k37IDH5zMmIawDJgPXOC+95v7NgBFIZCUcEMFxE620f/BddCUORxRJWn0+8UChf5OVGWck+a9NC3IwhBZM7aJa737Er43oTu6GLnFbmOuJ96ut3nal46Xj74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724090699; c=relaxed/simple; bh=uhcHWPb2xTrhdnPGHS3qLJd7wXvBdsT9BOPncAM9mUI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fiZukWVtTfbcMPii5WtDPtyHgSdq2I9SZ/AidVR1XzPRnbswybQH4q4/wgjKnvd6/zM35xay4J/+msOdVF/Q5gSbWUAsaJBugmwwDw7nhFgAKv/m4csEhPJG92+o69jGUxFqWLow3tTB4VJAbR7UVMX8YwMBRfKrfznrmYGuWbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org X-CSE-ConnectionGUID: pZ8XfnpBRge2m6Qh8H1BJA== X-CSE-MsgGUID: Km54+G1dQjuHHcanrzTuSQ== X-IronPort-AV: E=McAfee;i="6700,10204,11169"; a="22533078" X-IronPort-AV: E=Sophos;i="6.10,159,1719903600"; d="scan'208";a="22533078" 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:54 -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> Precedence: bulk X-Mailing-List: linux-fpga@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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