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-next>] [day] [month] [year] [list]
Date:   Sun, 19 Jul 2020 19:42:22 +0530
From:   Suraj Upadhyay <usuraj35@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3] staging: kpc2000: Replace depracated MSI APIs

Replace depracated MSI IRQ enabler and disabler
with pci_alloc_irq_vectors and pci_free_irq_vectors respectively.
Compile tested.

Signed-off-by: Suraj Upadhyay <usuraj35@...il.com>
---
Changes:
	v3: Replaced the disabler for MSI IRQ too with
            pci_free_irq_vectors.
	v2: Fix the undefined variable error.
	    Reported-by: kernel test robot <lkp@...el.com>
---
 drivers/staging/kpc2000/kpc2000/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c
index 358d7b2f4ad1..952ae8d11f9d 100644
--- a/drivers/staging/kpc2000/kpc2000/core.c
+++ b/drivers/staging/kpc2000/kpc2000/core.c
@@ -440,7 +440,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 	dev_dbg(&pcard->pdev->dev,
 		"Using DMA mask %0llx\n", dma_get_mask(PCARD_TO_DEV(pcard)));
 
-	err = pci_enable_msi(pcard->pdev);
+	err = pci_alloc_irq_vectors(pcard->pdev, 1, 1, PCI_IRQ_MSI);
 	if (err < 0)
 		goto err_release_dma;
 
@@ -474,7 +474,7 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,
 err_free_irq:
 	free_irq(pcard->pdev->irq, pcard);
 err_disable_msi:
-	pci_disable_msi(pcard->pdev);
+	pci_free_irq_vectors(pcard->pdev);
 err_release_dma:
 	pci_release_region(pdev, DMA_BAR);
 err_unmap_dma:
-- 
2.17.1


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ