All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Chen Qun <kuhn.chenqun@huawei.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
	pannengyuan@huawei.com, zhang.zhanghailiang@huawei.com,
	Euler Robot <euler.robot@huawei.com>,
	Shannon Zhao <shannon.zhaosl@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Igor Mammedov <imammedo@redhat.com>,
	qemu-arm@nongnu.org
Subject: Re: [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()
Date: Mon, 31 Aug 2020 06:46:32 -0400	[thread overview]
Message-ID: <20200831064614-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200813073712.4001404-2-kuhn.chenqun@huawei.com>

On Thu, Aug 13, 2020 at 03:37:02PM +0800, Chen Qun wrote:
> Clang static code analyzer show warning:
> hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read
>     madt = acpi_data_push(table_data, sizeof *madt);
>     ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

feel free to merge through the trivial tree.

> ---
> Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: qemu-arm@nongnu.org
> ---
>  hw/arm/virt-acpi-build.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 91f0df7b13..f830f9b779 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -633,12 +633,11 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
>      int madt_start = table_data->len;
>      const MemMapEntry *memmap = vms->memmap;
>      const int *irqmap = vms->irqmap;
> -    AcpiMultipleApicTable *madt;
>      AcpiMadtGenericDistributor *gicd;
>      AcpiMadtGenericMsiFrame *gic_msi;
>      int i;
>  
> -    madt = acpi_data_push(table_data, sizeof *madt);
> +    acpi_data_push(table_data, sizeof(AcpiMultipleApicTable));
>  
>      gicd = acpi_data_push(table_data, sizeof *gicd);
>      gicd->type = ACPI_APIC_GENERIC_DISTRIBUTOR;
> -- 
> 2.23.0



WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Chen Qun <kuhn.chenqun@huawei.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	zhang.zhanghailiang@huawei.com, qemu-trivial@nongnu.org,
	pannengyuan@huawei.com, qemu-devel@nongnu.org,
	Shannon Zhao <shannon.zhaosl@gmail.com>,
	qemu-arm@nongnu.org, Euler Robot <euler.robot@huawei.com>,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt()
Date: Mon, 31 Aug 2020 06:46:32 -0400	[thread overview]
Message-ID: <20200831064614-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200813073712.4001404-2-kuhn.chenqun@huawei.com>

On Thu, Aug 13, 2020 at 03:37:02PM +0800, Chen Qun wrote:
> Clang static code analyzer show warning:
> hw/arm/virt-acpi-build.c:641:5: warning: Value stored to 'madt' is never read
>     madt = acpi_data_push(table_data, sizeof *madt);
>     ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

feel free to merge through the trivial tree.

> ---
> Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: qemu-arm@nongnu.org
> ---
>  hw/arm/virt-acpi-build.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
> index 91f0df7b13..f830f9b779 100644
> --- a/hw/arm/virt-acpi-build.c
> +++ b/hw/arm/virt-acpi-build.c
> @@ -633,12 +633,11 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms)
>      int madt_start = table_data->len;
>      const MemMapEntry *memmap = vms->memmap;
>      const int *irqmap = vms->irqmap;
> -    AcpiMultipleApicTable *madt;
>      AcpiMadtGenericDistributor *gicd;
>      AcpiMadtGenericMsiFrame *gic_msi;
>      int i;
>  
> -    madt = acpi_data_push(table_data, sizeof *madt);
> +    acpi_data_push(table_data, sizeof(AcpiMultipleApicTable));
>  
>      gicd = acpi_data_push(table_data, sizeof *gicd);
>      gicd->type = ACPI_APIC_GENERIC_DISTRIBUTOR;
> -- 
> 2.23.0


  parent reply	other threads:[~2020-08-31 10:46 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-13  7:37 [PATCH 00/11] trivial patchs for static code analyzer fixes Chen Qun
2020-08-13  7:37 ` Chen Qun
2020-08-13  7:37 ` [PATCH 01/11] hw/arm/virt-acpi-build:Remove dead assignment in build_madt() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-19 11:06   ` Igor Mammedov
2020-08-19 11:06     ` Igor Mammedov
2020-08-31 10:46   ` Michael S. Tsirkin [this message]
2020-08-31 10:46     ` Michael S. Tsirkin
2020-08-13  7:37 ` [PATCH 02/11] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  7:37 ` [PATCH 03/11] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  7:37 ` [PATCH 04/11] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  7:37 ` [PATCH 05/11] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13 17:44   ` Raphael Norwitz
2020-08-13 17:44     ` Raphael Norwitz
2020-08-31 10:46   ` Michael S. Tsirkin
2020-08-31 10:46     ` Michael S. Tsirkin
2020-08-13  7:37 ` [PATCH 06/11] hw/net/virtio-net:Remove redundant statement in virtio_net_rsc_tcp_ctrl_check() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  8:18   ` Philippe Mathieu-Daudé
2020-08-13  8:18     ` Philippe Mathieu-Daudé
2020-08-31 10:47   ` Michael S. Tsirkin
2020-08-31 10:47     ` Michael S. Tsirkin
2020-08-13  7:37 ` [PATCH 07/11] vfio/platform: Remove dead assignment in vfio_intp_interrupt() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  9:25   ` Auger Eric
2020-08-13  9:25     ` Auger Eric
2020-08-13 16:59   ` Alex Williamson
2020-08-13 16:59     ` Alex Williamson
2020-08-13 18:02     ` Auger Eric
2020-08-13 18:02       ` Auger Eric
2020-08-13 19:15       ` Alex Williamson
2020-08-13 19:15         ` Alex Williamson
2020-08-13 19:18         ` Auger Eric
2020-08-13 19:18           ` Auger Eric
2020-08-18 12:54           ` Stefan Hajnoczi
2020-08-18 12:54             ` Stefan Hajnoczi
2020-08-18 13:42             ` Auger Eric
2020-08-13  7:37 ` [PATCH 08/11] tcg/optimize: Remove redundant statement in tcg_optimize() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13 16:22   ` Richard Henderson
2020-08-13 16:22     ` Richard Henderson
2020-08-17 13:04     ` Chenqun (kuhn)
2020-08-17 13:04       ` Chenqun (kuhn)
2020-08-18  0:24       ` Richard Henderson
2020-08-13  7:37 ` [PATCH 09/11] usb/bus: Remove dead assignment in usb_get_fw_dev_path() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  9:05   ` Chenqun (kuhn)
2020-08-13  9:05     ` Chenqun (kuhn)
2020-08-13  7:37 ` [PATCH 10/11] hw/intc: Remove redundant statement in exynos4210_combiner_read() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-13  7:37 ` [PATCH 11/11] hw/display/vga:Remove redundant statement in vga_draw_graphic() Chen Qun
2020-08-13  7:37   ` Chen Qun
2020-08-17  6:49   ` Gerd Hoffmann
2020-08-17  6:49     ` Gerd Hoffmann
2020-08-13  8:39 ` [PATCH 00/11] trivial patchs for static code analyzer fixes no-reply
2020-08-13  8:39   ` no-reply
2020-08-13  9:23 ` no-reply
2020-08-13  9:23   ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200831064614-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=euler.robot@huawei.com \
    --cc=imammedo@redhat.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=pannengyuan@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=shannon.zhaosl@gmail.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.