Michael S. Tsirkin
2020-Jun-08 05:45 UTC
[PATCH] virtio-mem: drop unnecessary initialization
rc is initialized to -ENIVAL but that's never used. Drop it. Fixes: 5f1f79bbc9e2 ("virtio-mem: Paravirtualized memory hotplug") Reported-by: kernel test robot <lkp at intel.com> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/virtio/virtio_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index f658fe9149be..2f357142ea5e 100644 --- a/drivers/virtio/virtio_mem.c +++ b/drivers/virtio/virtio_mem.c @@ -1768,7 +1768,7 @@ static void virtio_mem_delete_resource(struct virtio_mem *vm) static int virtio_mem_probe(struct virtio_device *vdev) { struct virtio_mem *vm; - int rc = -EINVAL; + int rc; BUILD_BUG_ON(sizeof(struct virtio_mem_req) != 24); BUILD_BUG_ON(sizeof(struct virtio_mem_resp) != 10); -- MST
On 2020/6/8 ??1:45, Michael S. Tsirkin wrote:> rc is initialized to -ENIVAL but that's never used. Drop it. > > Fixes: 5f1f79bbc9e2 ("virtio-mem: Paravirtualized memory hotplug") > Reported-by: kernel test robot <lkp at intel.com> > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/virtio/virtio_mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c > index f658fe9149be..2f357142ea5e 100644 > --- a/drivers/virtio/virtio_mem.c > +++ b/drivers/virtio/virtio_mem.c > @@ -1768,7 +1768,7 @@ static void virtio_mem_delete_resource(struct virtio_mem *vm) > static int virtio_mem_probe(struct virtio_device *vdev) > { > struct virtio_mem *vm; > - int rc = -EINVAL; > + int rc; > > BUILD_BUG_ON(sizeof(struct virtio_mem_req) != 24); > BUILD_BUG_ON(sizeof(struct virtio_mem_resp) != 10);Acked-by: Jason Wang <jasowang at redhat.com>
David Hildenbrand
2020-Jun-08 06:44 UTC
[PATCH] virtio-mem: drop unnecessary initialization
On 08.06.20 07:45, Michael S. Tsirkin wrote:> rc is initialized to -ENIVAL but that's never used. Drop it. > > Fixes: 5f1f79bbc9e2 ("virtio-mem: Paravirtualized memory hotplug") > Reported-by: kernel test robot <lkp at intel.com> > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/virtio/virtio_mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c > index f658fe9149be..2f357142ea5e 100644 > --- a/drivers/virtio/virtio_mem.c > +++ b/drivers/virtio/virtio_mem.c > @@ -1768,7 +1768,7 @@ static void virtio_mem_delete_resource(struct virtio_mem *vm) > static int virtio_mem_probe(struct virtio_device *vdev) > { > struct virtio_mem *vm; > - int rc = -EINVAL; > + int rc; > > BUILD_BUG_ON(sizeof(struct virtio_mem_req) != 24); > BUILD_BUG_ON(sizeof(struct virtio_mem_resp) != 10); >Acked-by: David Hildenbrand <david at redhat.com> -- Thanks, David / dhildenb