This is an automated email from Gerrit.

"Volodymyr Babchuk <vlad.babc...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6469

-- gerrit

commit 8a6535e69157f3d6a039a19aaf1714f342e946e2
Author: Volodymyr Babchuk <volodymyr_babc...@epam.com>
Date:   Mon Aug 23 22:23:40 2021 +0300

    renesas_rpchf: correct count check in rpchf_target_write_memory()
    
    rpchf_target_write_memory() clearly expects one word and is fed with
    one word. But for some reason it checks 'count' to be 2 and
    immediately fails. Fix this by correctly checking for count
    to be equal to 1.
    
    Signed-off-by: Volodymyr Babchuk <volodymyr_babc...@epam.com>
    Change-Id: I0033c46b5fd934e58c141105a36d0ebbb5eab02c

diff --git a/src/flash/nor/renesas_rpchf.c b/src/flash/nor/renesas_rpchf.c
index f99749f3d..82bbeb8f5 100644
--- a/src/flash/nor/renesas_rpchf.c
+++ b/src/flash/nor/renesas_rpchf.c
@@ -383,7 +383,7 @@ static int rpchf_target_write_memory(struct flash_bank 
*bank, target_addr_t addr
        struct target *target = bank->target;
        uint32_t wdata;
 
-       if (count != 2)
+       if (count != 1)
                return ERROR_FAIL;
 
        wdata = buffer[0] | (buffer[1] << 8);

-- 

Reply via email to