virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Yuan Liu <liuy139@gmail.com>
To: mst@redhat.com, jasowang@redhat.com
Cc: Yuan Liu <liuyuan@google.com>, virtualization@lists.linux-foundation.org
Subject: [PATCH] virtio_mmio: Set dev.release() to avoid warning
Date: Wed, 23 Nov 2016 16:31:00 -0800	[thread overview]
Message-ID: <1479947460-9379-1-git-send-email-liuy139@gmail.com> (raw)

From: Yuan Liu <liuyuan@google.com>

Fix a warning thrown from virtio_mmio_remove():
Device 'virtio0' does not have a release() function

The fix is according to virtio_pci_probe() of
drivers/virtio/virtio_pci_common.c

Signed-off-by: Yuan Liu <liuyuan@google.com>
---
 drivers/virtio/virtio_mmio.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index 48bfea9..d47a2fc 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -489,6 +489,7 @@ static const struct virtio_config_ops virtio_mmio_config_ops = {
 };
 
 
+static void virtio_mmio_release_dev_empty(struct device *_d) {}
 
 /* Platform device */
 
@@ -511,6 +512,7 @@ static int virtio_mmio_probe(struct platform_device *pdev)
 		return  -ENOMEM;
 
 	vm_dev->vdev.dev.parent = &pdev->dev;
+	vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty;
 	vm_dev->vdev.config = &virtio_mmio_config_ops;
 	vm_dev->pdev = pdev;
 	INIT_LIST_HEAD(&vm_dev->virtqueues);
-- 
2.8.0.rc3.226.g39d4020

             reply	other threads:[~2016-11-24  0:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24  0:31 Yuan Liu [this message]
2016-11-25  2:37 ` [PATCH] virtio_mmio: Set dev.release() to avoid warning Jason Wang
2016-11-25  2:47   ` Yuan Liu
2016-11-25  2:51     ` Jason Wang

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=1479947460-9379-1-git-send-email-liuy139@gmail.com \
    --to=liuy139@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=liuyuan@google.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 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).