search for: virtio_mmio_release_dev_empty

Displaying 17 results from an estimated 17 matches for "virtio_mmio_release_dev_empty".

2016 Nov 24
2
[PATCH] virtio_mmio: Set dev.release() to avoid warning
...ed, 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 = &virt...
2016 Nov 24
2
[PATCH] virtio_mmio: Set dev.release() to avoid warning
...ed, 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 = &virt...
2016 Nov 25
1
[PATCH] virtio_mmio: Set dev.release() to avoid warning
.../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) {} >> > > Do we need to free vm_dev here? > > > /* Platform device */ >> @@ -511,6 +512,7 @@ static int virtio_mmio_probe(struct platform_device >> *pdev) >> return -ENOMEM; >> vm_dev->vdev.dev.parent...
2016 Nov 25
1
[PATCH] virtio_mmio: Set dev.release() to avoid warning
.../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) {} >> > > Do we need to free vm_dev here? > > > /* Platform device */ >> @@ -511,6 +512,7 @@ static int virtio_mmio_probe(struct platform_device >> *pdev) >> return -ENOMEM; >> vm_dev->vdev.dev.parent...
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
...(struct platform_device *pdev) return -EBUSY; vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); - if (!vm_dev) - return -ENOMEM; + if (!vm_dev) { + rc = -ENOMEM; + goto free_mem; + } vm_dev->vdev.dev.parent = &pdev->dev; vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; @@ -524,14 +526,17 @@ static int virtio_mmio_probe(struct platform_device *pdev) spin_lock_init(&vm_dev->lock); vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); - if (vm_dev->base == NULL) - return -EFAULT; + if (vm_dev->base == NULL) { + r...
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
...(struct platform_device *pdev) return -EBUSY; vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); - if (!vm_dev) - return -ENOMEM; + if (!vm_dev) { + rc = -ENOMEM; + goto free_mem; + } vm_dev->vdev.dev.parent = &pdev->dev; vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; @@ -524,14 +526,17 @@ static int virtio_mmio_probe(struct platform_device *pdev) spin_lock_init(&vm_dev->lock); vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); - if (vm_dev->base == NULL) - return -EFAULT; + if (vm_dev->base == NULL) { + r...
2016 Nov 25
0
[PATCH] virtio_mmio: Set dev.release() to avoid warning
...irtio/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) {} Do we need to free vm_dev here? > > /* 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.d...
2016 Nov 25
0
[PATCH] virtio_mmio: Set dev.release() to avoid warning
...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) {} > > > Do we need to free vm_dev here? > > > /* Platform device */ > @@ -511,6 +512,7 @@ static int virtio_mmio_probe(struct > platform_device *pdev) > return -ENOMEM; >...
2017 Dec 04
0
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
...!vm_dev) > - return -ENOMEM; > + if (!vm_dev) { > + rc = -ENOMEM; Touching this would be a good time to remove the extra space in front of the -ENOMEM :) > + goto free_mem; > + } > > vm_dev->vdev.dev.parent = &pdev->dev; > vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; (...) > @@ -573,7 +580,18 @@ static int virtio_mmio_probe(struct platform_device *pdev) > > platform_set_drvdata(pdev, vm_dev); > > - return register_virtio_device(&vm_dev->vdev); > + rc = register_virtio_device(&vm_dev->vdev); > + if (rc) > + goto un...
2017 Dec 06
0
[PATCH v3 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...), 10 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..ec40104 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -493,7 +493,16 @@ static const struct virtio_config_ops virtio_mmio_config_ops = { }; -static void virtio_mmio_release_dev_empty(struct device *_d) {} +static void virtio_mmio_release_dev(struct device *_d) +{ + struct virtio_device *vdev = + container_of(_d, struct virtio_device, dev); + struct virtio_mmio_device *vm_dev = + container_of(vdev, struct virtio_mmio_device, vdev); + struct platform_device *pdev = vm_dev-&gt...
2017 Dec 06
4
[PATCH v3 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 57 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) -- 2.9.4
2017 Dec 06
4
[PATCH v3 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 57 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 10 deletions(-) -- 2.9.4
2017 Dec 05
0
[PATCH v2 1/2] virtio_mmio: add cleanup for virtio_mmio_probe
...e(struct platform_device *pdev) return -EBUSY; vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); - if (!vm_dev) - return -ENOMEM; + if (!vm_dev) { + rc = -ENOMEM; + goto free_mem; + } vm_dev->vdev.dev.parent = &pdev->dev; vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; @@ -524,14 +526,17 @@ static int virtio_mmio_probe(struct platform_device *pdev) spin_lock_init(&vm_dev->lock); vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); - if (vm_dev->base == NULL) - return -EFAULT; + if (vm_dev->base == NULL) { + r...
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); } - kfree(info); -error_kmalloc: error_available: return ERR_PTR(err); } @@ -516,8 +474,6 @@ static int virtio_mmio_probe(struct platform_device *pdev) 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); - spin_lock_init(&vm_dev->lock); vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); if (vm_dev->base == NULL) -- 2.11....
2017 Feb 04
0
[PATCH] virtio_mmio: remove virtio_mmio_vq_info
...(0, vm_dev->base + VIRTIO_MMIO_QUEUE_READY); WARN_ON(readl(vm_dev->base + VIRTIO_MMIO_QUEUE_READY)); } - kfree(info); -error_kmalloc: error_available: return ERR_PTR(err); } @@ -516,8 +474,6 @@ static int virtio_mmio_probe(struct platform_device *pdev) 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); - spin_lock_init(&vm_dev->lock); vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); if (vm_dev->base == NULL) -- 2.11....
2017 Dec 05
3
[PATCH v2 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) -- 2.9.4
2017 Dec 05
3
[PATCH v2 0/2] Add cleanup for virtio_mmio driver
this patchset try to add cleanup for virtio_mmio driver, include virtio_mmio_probe and virtio_mmio_remove weiping zhang (2): virtio_mmio: add cleanup for virtio_mmio_probe virtio_mmio: add cleanup for virtio_mmio_remove drivers/virtio/virtio_mmio.c | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) -- 2.9.4