All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Michael Tokarev" <mjt@tls.msk.ru>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Euler Robot" <euler.robot@huawei.com>,
	"Chen Qun" <kuhn.chenqun@huawei.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: [PULL 03/20] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()
Date: Mon,  4 May 2020 13:57:41 +0200	[thread overview]
Message-ID: <20200504115758.283914-4-laurent@vivier.eu> (raw)
In-Reply-To: <20200504115758.283914-1-laurent@vivier.eu>

From: Chen Qun <kuhn.chenqun@huawei.com>

Clang static code analyzer show warning:
hw/timer/exynos4210_mct.c:1370:9: warning: Value stored to 'index' is never read
        index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i);
        ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/timer/exynos4210_mct.c:1399:9: warning: Value stored to 'index' is never read
        index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i);
        ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hw/timer/exynos4210_mct.c:1441:9: warning: Value stored to 'index' is never read
        index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i);
        ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200325025919.21316-4-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 hw/timer/exynos4210_mct.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
index 944120aea59c..570cf7075bc5 100644
--- a/hw/timer/exynos4210_mct.c
+++ b/hw/timer/exynos4210_mct.c
@@ -1367,7 +1367,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
 
     case L0_TCNTB: case L1_TCNTB:
         lt_i = GET_L_TIMER_IDX(offset);
-        index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i);
 
         /*
          * TCNTB is updated to internal register only after CNT expired.
@@ -1396,7 +1395,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
 
     case L0_ICNTB: case L1_ICNTB:
         lt_i = GET_L_TIMER_IDX(offset);
-        index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i);
 
         s->l_timer[lt_i].reg.wstat |= L_WSTAT_ICNTB_WRITE;
         s->l_timer[lt_i].reg.cnt[L_REG_CNT_ICNTB] = value &
@@ -1438,8 +1436,6 @@ static void exynos4210_mct_write(void *opaque, hwaddr offset,
 
     case L0_FRCNTB: case L1_FRCNTB:
         lt_i = GET_L_TIMER_IDX(offset);
-        index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i);
-
         DPRINTF("local timer[%d] FRCNTB write %llx\n", lt_i, value);
 
         s->l_timer[lt_i].reg.wstat |= L_WSTAT_FRCCNTB_WRITE;
-- 
2.26.2



  parent reply	other threads:[~2020-05-04 12:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 11:57 [PULL 00/20] Trivial branch for 5.1 patches Laurent Vivier
2020-05-04 11:57 ` [PULL 01/20] scsi/esp-pci: add g_assert() for fix clang analyzer warning in esp_pci_io_write() Laurent Vivier
2020-05-04 11:57 ` [PULL 02/20] display/blizzard: use extract16() for fix clang analyzer warning in blizzard_draw_line16_32() Laurent Vivier
2020-05-04 11:57 ` Laurent Vivier [this message]
2020-05-04 11:57 ` [PULL 04/20] crypto: Redundant type conversion for AES_KEY pointer Laurent Vivier
2020-05-04 12:58   ` Daniel P. Berrangé
2020-05-05  7:20     ` Chenqun (kuhn)
2020-05-04 11:57 ` [PULL 05/20] MAINTAINERS: Mark the LatticeMico32 target as orphan Laurent Vivier
2020-05-04 11:57 ` [PULL 06/20] hw/mem/pc-dimm: Print slot number on error at pc_dimm_pre_plug() Laurent Vivier
2020-05-04 11:57 ` [PULL 07/20] hw/mem/pc-dimm: Fix line over 80 characters warning Laurent Vivier
2020-05-04 11:57 ` [PULL 08/20] elf_ops: Don't try to g_mapped_file_unref(NULL) Laurent Vivier
2020-05-04 11:57 ` [PULL 09/20] MAINTAINERS: Update Keith Busch's email address Laurent Vivier
2020-05-04 11:57 ` [PULL 10/20] chardev: Add macOS to list of OSes that support -chardev serial Laurent Vivier
2020-05-04 11:57 ` [PULL 11/20] Compress lines for immediate return Laurent Vivier
2020-05-04 11:57 ` [PULL 12/20] block: Avoid dead assignment Laurent Vivier
2020-05-04 11:57 ` [PULL 13/20] blockdev: Remove " Laurent Vivier
2020-05-04 11:57 ` [PULL 14/20] hw/i2c/pm_smbus: " Laurent Vivier
2020-05-04 11:57 ` [PULL 15/20] hw/input/adb-kbd: " Laurent Vivier
2020-05-04 11:57 ` [PULL 16/20] hw/ide/sii3112: " Laurent Vivier
2020-05-04 11:57 ` [PULL 17/20] hw/isa/i82378: " Laurent Vivier
2020-05-04 11:57 ` [PULL 18/20] hw/gpio/aspeed_gpio: " Laurent Vivier
2020-05-04 11:57 ` [PULL 19/20] hw/timer/stm32f2xx_timer: " Laurent Vivier
2020-05-04 11:57 ` [PULL 20/20] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning Laurent Vivier
2020-05-04 12:17 ` [PULL 00/20] Trivial branch for 5.1 patches Peter Maydell
2020-05-04 12:32   ` Laurent Vivier
2020-05-04 12:34   ` Daniel P. Berrangé
2020-05-04 12:34   ` Peter Maydell
2020-05-04 12:40     ` Laurent Vivier

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=20200504115758.283914-4-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alistair.francis@wdc.com \
    --cc=euler.robot@huawei.com \
    --cc=kuhn.chenqun@huawei.com \
    --cc=mjt@tls.msk.ru \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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.