* [PATCH v3] staging: kpc2000: Replace depracated MSI APIs
@ 2020-07-19 14:12 Suraj Upadhyay
2020-07-20 8:32 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Suraj Upadhyay @ 2020-07-19 14:12 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1336 bytes --]
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@gmail.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@intel.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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 169 bytes --]
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] staging: kpc2000: Replace depracated MSI APIs
2020-07-19 14:12 [PATCH v3] staging: kpc2000: Replace depracated MSI APIs Suraj Upadhyay
@ 2020-07-20 8:32 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2020-07-20 8:32 UTC (permalink / raw)
To: Suraj Upadhyay; +Cc: devel, gregkh, linux-kernel
On Sun, Jul 19, 2020 at 07:42:22PM +0530, Suraj Upadhyay wrote:
> 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@gmail.com>
> ---
> Changes:
> v3: Replaced the disabler for MSI IRQ too with
> pci_free_irq_vectors.
No, this still has bugs. Grep the file for msi and update everything
and update the comments and label names as well.
Can you just slow down a bit and fix one driver correctly before trying
to fix a bunch of drivers?
regards,
dan carpenter
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-20 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-19 14:12 [PATCH v3] staging: kpc2000: Replace depracated MSI APIs Suraj Upadhyay
2020-07-20 8:32 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).