search for: rproc_vdev_release

Displaying 10 results from an estimated 10 matches for "rproc_vdev_release".

2017 Dec 20
1
[PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure
...n", ret); > goto out; > } > > dev_info(dev, "registered %s (type %d)\n", dev_name(&vdev->dev), id); > > + return 0; > + > out: > + if (reg_dev) > + put_device(&vdev->dev); > + else { > + kref_put(&rvdev->refcount, rproc_vdev_release); > + put_device(&rproc->dev); > + } > + > return ret; > } > I think in this case using the marker makes a straightforward cleanup way too complicated. There's a single way we can get to the out label, and that's when register_virtio_device() failed. Switchin...
2017 Dec 20
0
[PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure
...>dev); dev_err(dev, "failed to register vdev: %d\n", ret); goto out; } dev_info(dev, "registered %s (type %d)\n", dev_name(&vdev->dev), id); + return 0; + out: + if (reg_dev) + put_device(&vdev->dev); + else { + kref_put(&rvdev->refcount, rproc_vdev_release); + put_device(&rproc->dev); + } + return ret; } -- 2.9.4
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi, The main change is split device_register into 2 sperate calls: device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device. v3->v4: * split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device. v2->v3: * virtio: add new helper do get
2017 Dec 20
8
[PATCH v4 0/4] use put_device to cleanup resource
Hi, The main change is split device_register into 2 sperate calls: device_initalize() and device_add, and then the caller can use put_device safety when fail to register_virtio_device. v3->v4: * split device_register into device_initialize and devicea_add that the caller can always use put_device when fail to register virtio device. v2->v3: * virtio: add new helper do get
2017 Dec 17
6
[PATCH v3 0/5] proper cleanup if fail to register_virtio_device
Hi, Patch1 add a helper to get virtio_device's status which will be used later. Patch2~4: check virtio_device's status is RTIO_CONFIG_S_ACKNOWLEDGE or not, if so use put_device otherwise use kfree. Patch5: add comments for virtio_register_device help caller do a proper cleanup if got failure. weiping zhang (5): virtio: add helper virtio_get_status virtio_pci: don't kfree device
2017 Dec 17
6
[PATCH v3 0/5] proper cleanup if fail to register_virtio_device
Hi, Patch1 add a helper to get virtio_device's status which will be used later. Patch2~4: check virtio_device's status is RTIO_CONFIG_S_ACKNOWLEDGE or not, if so use put_device otherwise use kfree. Patch5: add comments for virtio_register_device help caller do a proper cleanup if got failure. weiping zhang (5): virtio: add helper virtio_get_status virtio_pci: don't kfree device
2013 Apr 09
1
[PATCHv2 virtio-next] remoteproc: Add support for host virtio rings (vringh)
...proc_virtio_finalize_features, @@ -270,6 +467,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id) vdev->id.device = id, vdev->config = &rproc_virtio_config_ops, + vdev->vringh_config = &rproc_virtio_vringh_ops; vdev->dev.parent = dev; vdev->dev.release = rproc_vdev_release; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index faf3332..be191bc 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -39,6 +39,7 @@ #include <linux/klist.h> #include <linux/mutex.h> #include <linux/virtio.h> +#include <li...
2013 Apr 09
1
[PATCHv2 virtio-next] remoteproc: Add support for host virtio rings (vringh)
...proc_virtio_finalize_features, @@ -270,6 +467,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id) vdev->id.device = id, vdev->config = &rproc_virtio_config_ops, + vdev->vringh_config = &rproc_virtio_vringh_ops; vdev->dev.parent = dev; vdev->dev.release = rproc_vdev_release; diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index faf3332..be191bc 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -39,6 +39,7 @@ #include <linux/klist.h> #include <linux/mutex.h> #include <linux/virtio.h> +#include <li...
2013 Mar 15
2
[PATCH 0/2] remoteproc : support for host virtio
From: Erwan Yvin <erwan.yvin at stericsson.com> This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. with the vringh wrapper patch on top. They do not apply cleanly on top of the remoteproc virtio config patches from Sjur, but it merges fine. CAIF will use this new host virtio ring implementation. Ido,
2013 Mar 15
2
[PATCH 0/2] remoteproc : support for host virtio
From: Erwan Yvin <erwan.yvin at stericsson.com> This driver depends on Rusty's new host virtio ring implementation, so this patch-set is based on the vringh branch in Rusty's git. with the vringh wrapper patch on top. They do not apply cleanly on top of the remoteproc virtio config patches from Sjur, but it merges fine. CAIF will use this new host virtio ring implementation. Ido,