All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
Cc: 'Jingoo Han' <jg1.han@samsung.com>,
	"'Michael S. Tsirkin'" <mst@redhat.com>,
	'Andrew Vagin' <avagin@openvz.org>,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
Date: Sun, 01 Dec 2013 21:07:39 +1030	[thread overview]
Message-ID: <87y54426x8.fsf@rustcorp.com.au> (raw)
In-Reply-To: <002301cee98d$b658da60$230a8f20$%han@samsung.com>

Jingoo Han <jg1.han@samsung.com> writes:
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.

Thanks,
Rusty.

> ---
>  drivers/virtio/virtio_pci.c |    2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
> index a37c699..a416f9b 100644
> --- a/drivers/virtio/virtio_pci.c
> +++ b/drivers/virtio/virtio_pci.c
> @@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
>  	return 0;
>  
>  out_set_drvdata:
> -	pci_set_drvdata(pci_dev, NULL);
>  	pci_iounmap(pci_dev, vp_dev->ioaddr);
>  out_req_regions:
>  	pci_release_regions(pci_dev);
> @@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
>  	unregister_virtio_device(&vp_dev->vdev);
>  
>  	vp_del_vqs(&vp_dev->vdev);
> -	pci_set_drvdata(pci_dev, NULL);
>  	pci_iounmap(pci_dev, vp_dev->ioaddr);
>  	pci_release_regions(pci_dev);
>  	pci_disable_device(pci_dev);
> -- 
> 1.7.10.4

      reply	other threads:[~2013-12-01 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25  3:23 [PATCH] virtio: pci: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-01 10:37 ` Rusty Russell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y54426x8.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=avagin@openvz.org \
    --cc=jg1.han@samsung.com \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.