Displaying 20 results from an estimated 46 matches for "out_nd".
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...amp;ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> + if (!nd_region) {
> + dev_err(&vdev->dev, "failed to create nvdimm region\n");
> + err = -ENXIO;
> + goto out_nd;
> + }
> + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
> + return 0;
> +out_nd:
> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + return err;
> +}
> +
> +static...
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...amp;ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> + if (!nd_region) {
> + dev_err(&vdev->dev, "failed to create nvdimm region\n");
> + err = -ENXIO;
> + goto out_nd;
> + }
> + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
> + return 0;
> +out_nd:
> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + return err;
> +}
> +
> +static...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...virtio
> + (nd_region->dev.parent->parent);
Isn't it clear that this parent chain will always end up at &vdev->dev?
Maybe simply set ->provider_data to vdev directly? (Does it need to
grab a reference count of the device, BTW?)
> +
> + if (!nd_region)
> + goto out_nd;
Probably better to do this check before you access nd_region's
members :)
> +
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + dev_err(&vdev->dev, "failed...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...virtio
> + (nd_region->dev.parent->parent);
Isn't it clear that this parent chain will always end up at &vdev->dev?
Maybe simply set ->provider_data to vdev directly? (Does it need to
grab a reference count of the device, BTW?)
> +
> + if (!nd_region)
> + goto out_nd;
Probably better to do this check before you access nd_region's
members :)
> +
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + dev_err(&vdev->dev, "failed...
2019 May 15
0
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...;> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
>> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
>> + if (!nd_region) {
>> + dev_err(&vdev->dev, "failed to create nvdimm region\n");
>> + err = -ENXIO;
>> + goto out_nd;
>> + }
>> + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
>> + return 0;
>> +out_nd:
>> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
>> +out_vq:
>> + vdev->config->del_vqs(vdev);
>> +out_err:
>> + ret...
2019 May 16
0
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...+ set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> > + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> > + if (!nd_region) {
> > + dev_err(&vdev->dev, "failed to create nvdimm region\n");
> > + err = -ENXIO;
> > + goto out_nd;
> > + }
> > + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
> > + return 0;
> > +out_nd:
> > + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> > +out_vq:
> > + vdev->config->del_vqs(vdev);
> > +out_err:
> &...
2019 Apr 10
0
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...n't it clear that this parent chain will always end up at &vdev->dev?
> > Maybe simply set ->provider_data to vdev directly? (Does it need to
> > grab a reference count of the device, BTW?)
> >
> > > +
> > > + if (!nd_region)
> > > + goto out_nd;
> >
> > Probably better to do this check before you access nd_region's
> > members :)
> >
> > > +
> > > + return 0;
> > > +out_nd:
> > > + err = -ENXIO;
> > > + nvdimm_bus_unregister(nvdimm_bus);
> > > +out_vq:
>...
2019 Apr 10
0
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...ent->parent);
>
> Isn't it clear that this parent chain will always end up at &vdev->dev?
> Maybe simply set ->provider_data to vdev directly? (Does it need to
> grab a reference count of the device, BTW?)
>
> > +
> > + if (!nd_region)
> > + goto out_nd;
>
> Probably better to do this check before you access nd_region's
> members :)
>
> > +
> > + return 0;
> > +out_nd:
> > + err = -ENXIO;
> > + nvdimm_bus_unregister(nvdimm_bus);
> > +out_vq:
> > + vdev->config->del_vqs(vdev);
> &...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
....flush = async_pmem_flush;
> + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> +
> + if (!nd_region)
> + goto out_nd;
> + nd_region->provider_data = dev_to_virtio
> + (nd_region->dev.parent->parent);
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> +out_vq:
> + vdev-&g...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
....flush = async_pmem_flush;
> + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> +
> + if (!nd_region)
> + goto out_nd;
> + nd_region->provider_data = dev_to_virtio
> + (nd_region->dev.parent->parent);
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> +out_vq:
> + vdev-&g...
2019 May 10
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
..., &ndr_desc.flags);
> > > + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> > > + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus,
> > > &ndr_desc);
> > > +
> > > + if (!nd_region)
> > > + goto out_nd;
> > > + nd_region->provider_data = dev_to_virtio
> > > + (nd_region->dev.parent->parent);
> > > + return 0;
> > > +out_nd:
> > > + err = -ENXIO;
> > > + nvdimm_bus_unregist...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...EMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> + nd_region->provider_data = dev_to_virtio
> + (nd_region->dev.parent->parent);
> +
> + if (!nd_region)
> + goto out_nd;
> +
> + //virtio_device_ready(vdev);
Left over
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + dev_err(&vdev->dev, "failed to register virtio pmem memory\...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...EMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> + nd_region->provider_data = dev_to_virtio
> + (nd_region->dev.parent->parent);
> +
> + if (!nd_region)
> + goto out_nd;
> +
> + //virtio_device_ready(vdev);
Left over
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + dev_err(&vdev->dev, "failed to register virtio pmem memory\...
2019 Apr 30
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...desc.numa_node = nid;
> + ndr_desc.flush = async_pmem_flush;
> + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> +
> + if (!nd_region)
> + goto out_nd;
> + nd_region->provider_data = dev_to_virtio
Delete extra space here ----------^^
I think this will let you join the two lines.
> + (nd_region->dev.parent->parent);
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> +o...
2019 May 12
1
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...desc.numa_node = nid;
> + ndr_desc.flush = async_pmem_flush;
> + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> +
> + if (!nd_region)
> + goto out_nd;
> + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(vpmem->nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + dev_err(&vdev->dev,...
2019 Apr 10
2
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...EMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> + nd_region->provider_data = dev_to_virtio
> + (nd_region->dev.parent->parent);
> +
> + if (!nd_region)
> + goto out_nd;
> +
> + return 0;
> +out_nd:
> + err = -ENXIO;
> + nvdimm_bus_unregister(nvdimm_bus);
> +out_vq:
> + vdev->config->del_vqs(vdev);
> +out_err:
> + dev_err(&vdev->dev, "failed to register virtio pmem memory\n");
> + return err;
> +}
> +
>...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
..._desc.flush = async_pmem_flush;
> + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> +
I'd drop this empty line.
> + if (!nd_region)
> + goto out_nd;
> + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
Does it make sense to move some parts into separate functions for
readability? E.g., virtio_pmem_init_nvdimm_bus()
> + return 0;
> +out_nd:
> + err = -ENXIO;
I'd always initialize "err&quo...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
..._desc.flush = async_pmem_flush;
> + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);
> + set_bit(ND_REGION_ASYNC, &ndr_desc.flags);
> + nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc);
> +
I'd drop this empty line.
> + if (!nd_region)
> + goto out_nd;
> + nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent);
Does it make sense to move some parts into separate functions for
readability? E.g., virtio_pmem_init_nvdimm_bus()
> + return 0;
> +out_nd:
> + err = -ENXIO;
I'd always initialize "err&quo...
2019 Apr 04
1
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...&ndr_desc.flags);
> > > + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> > > + nd_region->provider_data = dev_to_virtio
> > > + (nd_region->dev.parent->parent);
> > > +
> > > + if (!nd_region)
> > > + goto out_nd;
> > > +
> > > + //virtio_device_ready(vdev);
> >
> > Left over
>
> o.k
>
> >
> > > + return 0;
> > > +out_nd:
> > > + err = -ENXIO;
> > > + nvdimm_bus_unregister(nvdimm_bus);
> > > +out_vq:
> > >...
2019 Apr 04
1
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...&ndr_desc.flags);
> > > + nd_region = nvdimm_pmem_region_create(nvdimm_bus, &ndr_desc);
> > > + nd_region->provider_data = dev_to_virtio
> > > + (nd_region->dev.parent->parent);
> > > +
> > > + if (!nd_region)
> > > + goto out_nd;
> > > +
> > > + //virtio_device_ready(vdev);
> >
> > Left over
>
> o.k
>
> >
> > > + return 0;
> > > +out_nd:
> > > + err = -ENXIO;
> > > + nvdimm_bus_unregister(nvdimm_bus);
> > > +out_vq:
> > >...