* [PATCH v2] uio/uio_pci_generic: remove unneeded pci_set_drvdata()
[not found] <20201119145906.73727-1-alexandru.ardelean@analog.com>
@ 2020-11-23 14:34 ` Alexandru Ardelean
2020-11-24 6:59 ` Ardelean, Alexandru
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Ardelean @ 2020-11-23 14:34 UTC (permalink / raw)
To: linux-kernel, kvm; +Cc: mst, gregkh, Alexandru Ardelean
The pci_get_drvdata() was moved during commit ef84928cff58
("uio/uio_pci_generic: use device-managed function equivalents").
Storing a private object with pci_set_drvdata() doesn't make sense
since that change, since there is no more pci_get_drvdata() call in the
driver to retrieve the information.
This change removes it.
Fixes: ef84928cff58 ("io/uio_pci_generic: use device-managed function equivalents")
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
drivers/uio/uio_pci_generic.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c
index 1c6c09e1280d..b8e44d16279f 100644
--- a/drivers/uio/uio_pci_generic.c
+++ b/drivers/uio/uio_pci_generic.c
@@ -101,13 +101,7 @@ static int probe(struct pci_dev *pdev,
"no support for interrupts?\n");
}
- err = devm_uio_register_device(&pdev->dev, &gdev->info);
- if (err)
- return err;
-
- pci_set_drvdata(pdev, gdev);
-
- return 0;
+ return devm_uio_register_device(&pdev->dev, &gdev->info);
}
static struct pci_driver uio_pci_driver = {
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH v2] uio/uio_pci_generic: remove unneeded pci_set_drvdata()
2020-11-23 14:34 ` [PATCH v2] uio/uio_pci_generic: remove unneeded pci_set_drvdata() Alexandru Ardelean
@ 2020-11-24 6:59 ` Ardelean, Alexandru
0 siblings, 0 replies; 2+ messages in thread
From: Ardelean, Alexandru @ 2020-11-24 6:59 UTC (permalink / raw)
To: Ardelean, Alexandru, linux-kernel, kvm; +Cc: mst, gregkh
> -----Original Message-----
> From: Alexandru Ardelean <alexandru.ardelean@analog.com>
> Sent: Monday, November 23, 2020 4:35 PM
> To: linux-kernel@vger.kernel.org; kvm@vger.kernel.org
> Cc: mst@redhat.com; gregkh@linuxfoundation.org; Ardelean, Alexandru
> <alexandru.Ardelean@analog.com>
> Subject: [PATCH v2] uio/uio_pci_generic: remove unneeded pci_set_drvdata()
>
> The pci_get_drvdata() was moved during commit ef84928cff58
> ("uio/uio_pci_generic: use device-managed function equivalents").
>
> Storing a private object with pci_set_drvdata() doesn't make sense since that
> change, since there is no more pci_get_drvdata() call in the driver to retrieve the
> information.
>
> This change removes it.
>
> Fixes: ef84928cff58 ("io/uio_pci_generic: use device-managed function
> equivalents")
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> ---
Forgot the changelog
Apologies.
Changelog v1 -> v2:
* added Fixes tag
* updated commit comment a bit from V1
> drivers/uio/uio_pci_generic.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index
> 1c6c09e1280d..b8e44d16279f 100644
> --- a/drivers/uio/uio_pci_generic.c
> +++ b/drivers/uio/uio_pci_generic.c
> @@ -101,13 +101,7 @@ static int probe(struct pci_dev *pdev,
> "no support for interrupts?\n");
> }
>
> - err = devm_uio_register_device(&pdev->dev, &gdev->info);
> - if (err)
> - return err;
> -
> - pci_set_drvdata(pdev, gdev);
> -
> - return 0;
> + return devm_uio_register_device(&pdev->dev, &gdev->info);
> }
>
> static struct pci_driver uio_pci_driver = {
> --
> 2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-24 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20201119145906.73727-1-alexandru.ardelean@analog.com>
2020-11-23 14:34 ` [PATCH v2] uio/uio_pci_generic: remove unneeded pci_set_drvdata() Alexandru Ardelean
2020-11-24 6:59 ` Ardelean, Alexandru
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).