search for: nvdimm_bus_unregist

Displaying 20 results from an estimated 49 matches for "nvdimm_bus_unregist".

Did you mean: nvdimm_bus_unregister
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...mp;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 void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev); > + > + nvdimm_...
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...mp;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 void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&vdev->dev); > + > + nvdimm_...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...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 to register virtio pmem memory\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct virt...
2019 Apr 10
3
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...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 to register virtio pmem memory\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct virt...
2019 May 15
0
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...ion) { >> + 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 void virtio_pmem_remove(struct virtio_device *vdev) >> +{ >> + struct nvdimm_bus *nvdimm_bus = dev_get_drvdata(&...
2019 May 16
0
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...gt; > + 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 void virtio_pmem_remove(struct virtio_device *vdev) > > +{ > > + struct nvdimm_bus *nvdimm_bus = dev_get_drvd...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...;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" along with the goto statement for readability, especially because ... > + nvdimm_bus_unregister(vpmem->nvdimm_bus); > +out_vq: ... you don't initialize err in this case. Err is here 0 if I am not wrong. > + vdev->config->del_vqs(vdev); > +out_err: > + dev_err(&vdev->dev, "failed to register virtio pmem memory\n"); Should we try to give more meani...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...;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" along with the goto statement for readability, especially because ... > + nvdimm_bus_unregister(vpmem->nvdimm_bus); > +out_vq: ... you don't initialize err in this case. Err is here 0 if I am not wrong. > + vdev->config->del_vqs(vdev); > +out_err: > + dev_err(&vdev->dev, "failed to register virtio pmem memory\n"); Should we try to give more meani...
2019 Apr 10
0
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...> > > + 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 to register virtio pmem memory\n"); > > > + return err; > > > +} > > > + > > > +stati...
2019 Apr 10
0
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...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 to register virtio pmem memory\n"); > > + return err; > > +} > > + > > +static void virtio_pmem_remove(struct virtio_...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...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, "failed to register virtio pmem memory\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev...
2019 May 07
2
[PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...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, "failed to register virtio pmem memory\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev...
2019 May 10
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...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, "failed to register virtio pmem memory\n"); > > > + return err; > > > +} > >...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...eate(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\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct virt...
2019 Apr 03
2
[Qemu-devel] [PATCH v4 2/5] virtio-pmem: Add virtio pmem driver
...eate(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\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct virt...
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...lloon.c: static void virtballoon_remove(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; ... kfree(vb); } I think you should do the same here, vdev->priv is allocated in virtio_pmem_probe. But maybe I am missing something important here :) >> >>> + nvdimm_bus_unregister(nvdimm_bus); >>> + vdev->config->del_vqs(vdev); >>> + vdev->config->reset(vdev); >>> +} >>> + -- Thanks, David / dhildenb
2019 May 14
2
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...lloon.c: static void virtballoon_remove(struct virtio_device *vdev) { struct virtio_balloon *vb = vdev->priv; ... kfree(vb); } I think you should do the same here, vdev->priv is allocated in virtio_pmem_probe. But maybe I am missing something important here :) >> >>> + nvdimm_bus_unregister(nvdimm_bus); >>> + vdev->config->del_vqs(vdev); >>> + vdev->config->reset(vdev); >>> +} >>> + -- Thanks, David / dhildenb
2019 Apr 30
1
[Qemu-devel] [PATCH v7 2/6] virtio-pmem: Add virtio pmem driver
...); > + > + 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); > +out_vq: > + vdev->config->del_vqs(vdev); > +out_err: > + dev_err(&vdev->dev, "failed to register virtio pmem memory\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + s...
2019 May 12
1
[PATCH v8 2/6] virtio-pmem: Add virtio pmem driver
...;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, "failed to register virtio pmem memory\n"); > + return err; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + s...
2019 Apr 10
2
[PATCH v5 2/5] virtio-pmem: Add virtio pmem driver
...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; > +} > + > +static void virtio_pmem_remove(struct virtio_device *vdev) > +{ > + struct virt...