lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250327110707.20025-3-phasta@kernel.org>
Date: Thu, 27 Mar 2025 12:07:07 +0100
From: Philipp Stanner <phasta@...nel.org>
To: Jonathan Corbet <corbet@....net>,
	Jens Axboe <axboe@...nel.dk>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Mark Brown <broonie@...nel.org>,
	David Lechner <dlechner@...libre.com>,
	Philipp Stanner <pstanner@...hat.com>,
	Damien Le Moal <dlemoal@...nel.org>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Yang Yingliang <yangyingliang@...wei.com>,
	Zijun Hu <quic_zijuhu@...cinc.com>,
	Hannes Reinecke <hare@...e.de>,
	Al Viro <viro@...iv.linux.org.uk>,
	Li Zetao <lizetao1@...wei.com>,
	Anuj Gupta <anuj20.g@...sung.com>
Cc: linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-block@...r.kernel.org,
	linux-pci@...r.kernel.org,
	Philipp Stanner <phasta@...nel.org>
Subject: [PATCH 1/2] mtip32xx: Remove unnecessary PCI function calls

pcim_iounmap_regions() is deprecated. Moreover, it is not necessary to
call it in the driver's remove() function or if probe() fails, since it
does cleanup automatically on driver detach.

Remove all calls to pcim_iounmap_regions().

Signed-off-by: Philipp Stanner <phasta@...nel.org>
---
 drivers/block/mtip32xx/mtip32xx.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 95361099a2dc..63b9c41d3c25 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3717,7 +3717,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
 	rv = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
 	if (rv) {
 		dev_warn(&pdev->dev, "64-bit DMA enable failed\n");
-		goto setmask_err;
+		goto iomap_err;
 	}
 
 	/* Copy the info we may need later into the private data structure. */
@@ -3733,7 +3733,7 @@ static int mtip_pci_probe(struct pci_dev *pdev,
 	if (!dd->isr_workq) {
 		dev_warn(&pdev->dev, "Can't create wq %d\n", dd->instance);
 		rv = -ENOMEM;
-		goto setmask_err;
+		goto iomap_err;
 	}
 
 	memset(cpu_list, 0, sizeof(cpu_list));
@@ -3830,8 +3830,6 @@ static int mtip_pci_probe(struct pci_dev *pdev,
 		drop_cpu(dd->work[1].cpu_binding);
 		drop_cpu(dd->work[2].cpu_binding);
 	}
-setmask_err:
-	pcim_iounmap_regions(pdev, 1 << MTIP_ABAR);
 
 iomap_err:
 	kfree(dd);
@@ -3907,7 +3905,6 @@ static void mtip_pci_remove(struct pci_dev *pdev)
 
 	pci_disable_msi(pdev);
 
-	pcim_iounmap_regions(pdev, 1 << MTIP_ABAR);
 	pci_set_drvdata(pdev, NULL);
 
 	put_disk(dd->disk);
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ