[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_s
From: |
Michael S. Tsirkin |
Subject: |
Re: [PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() |
Date: |
Mon, 31 Aug 2020 06:46:56 -0400 |
On Thu, Aug 13, 2020 at 03:37:06PM +0800, Chen Qun wrote:
> Clang static code analyzer show warning:
> hw/virtio/vhost-user.c:606:9: warning: Value stored to 'mr' is never read
> mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
feel free to merge through the trivial tree
> ---
> hw/virtio/vhost-user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index d7e2423762..9c5b4f7fbc 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -603,7 +603,7 @@ static void scrub_shadow_regions(struct vhost_dev *dev,
> */
> for (i = 0; i < dev->mem->nregions; i++) {
> reg = &dev->mem->regions[i];
> - mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
> + vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
> if (fd > 0) {
> ++fd_num;
> }
> --
> 2.23.0
- [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), (continued)
- [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Chen Qun, 2020/08/13
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Auger Eric, 2020/08/13
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Alex Williamson, 2020/08/13
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Auger Eric, 2020/08/13
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Alex Williamson, 2020/08/13
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Auger Eric, 2020/08/13
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Stefan Hajnoczi, 2020/08/18
- Re: [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt(), Auger Eric, 2020/08/18
[PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions(), Chen Qun, 2020/08/13
[PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path(), Chen Qun, 2020/08/13
[PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt(), Chen Qun, 2020/08/13
[PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check(), Chen Qun, 2020/08/13
[PATCH 11/11] hw/display/vga:Remove redundant statement in vga_draw_graphic(), Chen Qun, 2020/08/13