search for: zwp10758

Displaying 20 results from an estimated 26 matches for "zwp10758".

2017 Dec 01
3
[PATCH] virtio: release virtio index when fail to device_register
On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote: > On Wed, 29 Nov 2017 09:23:01 +0800 > weiping zhang <zwp10758 at gmail.com> wrote: > > > index can be reused by other virtio device. > > > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > > Reviewed-by: Cornelia Huck <cohuck at redhat.com> > > > --- > > drivers/virtio/virtio.c | 2...
2017 Dec 01
3
[PATCH] virtio: release virtio index when fail to device_register
On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote: > On Wed, 29 Nov 2017 09:23:01 +0800 > weiping zhang <zwp10758 at gmail.com> wrote: > > > index can be reused by other virtio device. > > > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > > Reviewed-by: Cornelia Huck <cohuck at redhat.com> > > > --- > > drivers/virtio/virtio.c | 2...
2017 Dec 20
2
[PATCH v4 1/4] virtio: split device_register into device_initialize and device_add
On Wed, 20 Dec 2017 12:26:25 +0800 weiping zhang <zwp10758 at gmail.com> wrote: [you used a different mail address in your From: than in your s-o-b:; same for the other patches] > In order to make caller do a simple cleanup, we split device_register > into device_initialize and device_add. device_initialize always sucess, s/success/succeeds/ &...
2017 Dec 20
2
[PATCH v4 1/4] virtio: split device_register into device_initialize and device_add
On Wed, 20 Dec 2017 12:26:25 +0800 weiping zhang <zwp10758 at gmail.com> wrote: [you used a different mail address in your From: than in your s-o-b:; same for the other patches] > In order to make caller do a simple cleanup, we split device_register > into device_initialize and device_add. device_initialize always sucess, s/success/succeeds/ &...
2017 Dec 19
1
[PATCH v3 5/5] virtio: add comments for virtio_register_device
On Sun, 17 Dec 2017 21:48:05 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > As mentioned at drivers/base/core.c: > /* > * NOTE: _Never_ directly free @dev after calling this function, even > * if it returned an error! Always use put_device() to give up the > * reference initialized in this function instead. > */ > virtio_regi...
2017 Dec 19
1
[PATCH v3 5/5] virtio: add comments for virtio_register_device
On Sun, 17 Dec 2017 21:48:05 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > As mentioned at drivers/base/core.c: > /* > * NOTE: _Never_ directly free @dev after calling this function, even > * if it returned an error! Always use put_device() to give up the > * reference initialized in this function instead. > */ > virtio_regi...
2017 Dec 20
1
[PATCH v4 4/4] virtio_remoteproc: don't kfree device on register failure
On Wed, 20 Dec 2017 12:27:33 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > rproc_virtio_dev_release will be called iff virtio_device.dev's > refer count became to 0. Here we should check if we call device_register "reference count drops to 0" s/call/called/ > or not, if called, put vdev.dev, and then rproc->dev's...
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 Nov 29
3
[PATCH] virtio: release virtio index when fail to device_register
index can be reused by other virtio device. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 48230a5..bf7ff39 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -333,6 +333,8 @@ int register_virtio_device(struct
2017 Nov 29
3
[PATCH] virtio: release virtio index when fail to device_register
index can be reused by other virtio device. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 48230a5..bf7ff39 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -333,6 +333,8 @@ int register_virtio_device(struct
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
cleanup all resource allocated by virtio_mmio_probe. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio_mmio.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..3fd0e66 100644 --- a/drivers/virtio/virtio_mmio.c +++
2017 Dec 01
2
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
cleanup all resource allocated by virtio_mmio_probe. Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> --- drivers/virtio/virtio_mmio.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc717..3fd0e66 100644 --- a/drivers/virtio/virtio_mmio.c +++
2017 Nov 29
0
[PATCH] virtio: release virtio index when fail to device_register
On Wed, 29 Nov 2017 09:23:01 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > index can be reused by other virtio device. > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> Reviewed-by: Cornelia Huck <cohuck at redhat.com> > --- > drivers/virtio/virtio.c | 2 ++ > 1 file changed, 2 insertions(+) &gt...
2017 Dec 04
0
[PATCH] virtio: release virtio index when fail to device_register
On Sat, 2 Dec 2017 00:55:39 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > On Wed, Nov 29, 2017 at 10:50:44AM +0100, Cornelia Huck wrote: > > We hold an extra reference to the struct device, even after a failed > > register, and it is the responsibility of the caller to give up that > > reference once no longer needed. As c...
2017 Dec 04
0
[PATCH] virtio_mmio: add cleanup for virtio_mmio_probe
On Sat, 2 Dec 2017 01:51:40 +0800 weiping zhang <zwp10758 at gmail.com> wrote: > cleanup all resource allocated by virtio_mmio_probe. > > Signed-off-by: weiping zhang <zhangweiping at didichuxing.com> > --- > drivers/virtio/virtio_mmio.c | 34 ++++++++++++++++++++++++++-------- > 1 file changed, 26 insertions(+), 8 deletions(...
2017 Dec 21
0
[PATCH v4 1/4] virtio: split device_register into device_initialize and device_add
2017-12-20 23:53 GMT+08:00 Cornelia Huck <cohuck at redhat.com>: > On Wed, 20 Dec 2017 12:26:25 +0800 > weiping zhang <zwp10758 at gmail.com> wrote: > > [you used a different mail address in your From: than in your s-o-b:; > same for the other patches] > >> In order to make caller do a simple cleanup, we split device_register >> into device_initialize and device_add. device_initialize always suces...
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
2017 Dec 17
0
[PATCH v3 5/5] virtio: add comments for virtio_register_device
As mentioned at drivers/base/core.c: /* * NOTE: _Never_ directly free @dev after calling this function, even * if it returned an error! Always use put_device() to give up the * reference initialized in this function instead. */ virtio_register_device may fail before/after call device_register, the caller should do a proper cleanup. Caller cann't use kfree directly, if virtio_register_device