This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7206

-- gerrit

commit cdcb593287a90a6b3d6ffbe91368cf2fcf7e86a2
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Mon Sep 19 14:50:26 2022 +0200

    target/riscv-013: fix unused initialization
    
    Scan-build reports:
            Unused code: Dead initialization
            riscv-013.c:2362 Value stored to 'control' during its
                    initialization is never read
    
    Remove the initialization of variable 'control'.
    
    Change-Id: I548f8175530b9a2aa4c1788549d6467bf9824584
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 1f4c34346a..99d3873de8 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -2359,9 +2359,7 @@ static int assert_reset(struct target *target)
                /* TODO: Try to use hasel in dmcontrol */
 
                /* Set haltreq for each hart. */
-               uint32_t control = control_base;
-
-               control = set_hartsel(control_base, target->coreid);
+               uint32_t control = set_hartsel(control_base, target->coreid);
                control = set_field(control, DM_DMCONTROL_HALTREQ,
                                target->reset_halt ? 1 : 0);
                dmi_write(target, DM_DMCONTROL, control);

-- 

Reply via email to