[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM6PR03MB441117D7BD9A2A539C2D2480F9FB0@DM6PR03MB4411.namprd03.prod.outlook.com>
Date: Tue, 24 Nov 2020 06:59:45 +0000
From: "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To: "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
CC: "mst@...hat.com" <mst@...hat.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: RE: [PATCH v2] uio/uio_pci_generic: remove unneeded pci_set_drvdata()
> -----Original Message-----
> From: Alexandru Ardelean <alexandru.ardelean@...log.com>
> Sent: Monday, November 23, 2020 4:35 PM
> To: linux-kernel@...r.kernel.org; kvm@...r.kernel.org
> Cc: mst@...hat.com; gregkh@...uxfoundation.org; Ardelean, Alexandru
> <alexandru.Ardelean@...log.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@...log.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
Powered by blists - more mailing lists