This is an automated email from Gerrit.

Edward Fewell (efew...@ti.com) just uploaded a new patch set to Gerrit, which 
you can find at http://openocd.zylin.com/4788

-- gerrit

commit a12ae75563295857d6f65642a74640e9e4fad3f5
Author: Edward Fewell <efew...@ti.com>
Date:   Wed Dec 5 17:10:45 2018 -0600

    flash/nor: update cc3220sf for issue found in code review
    
    Remove inappropriate use of bank_number.
    
    Change-Id: I11be1f2540cb09a3ccede35312f90bc8276af338
    Signed-off-by: Edward Fewell <efew...@ti.com>

diff --git a/src/flash/nor/cc3220sf.c b/src/flash/nor/cc3220sf.c
index 5ccb428..2441124 100644
--- a/src/flash/nor/cc3220sf.c
+++ b/src/flash/nor/cc3220sf.c
@@ -430,18 +430,10 @@ static int cc3220sf_probe(struct flash_bank *bank)
        uint32_t base;
        uint32_t size;
        int num_sectors;
-       int bank_id;
 
-       bank_id = bank->bank_number;
-
-       if (0 == bank_id) {
-               base = FLASH_BASE_ADDR;
-               size = FLASH_NUM_SECTORS * FLASH_SECTOR_SIZE;
-               num_sectors = FLASH_NUM_SECTORS;
-       } else {
-               /* Invalid bank number somehow */
-               return ERROR_FAIL;
-       }
+       base = FLASH_BASE_ADDR;
+       size = FLASH_NUM_SECTORS * FLASH_SECTOR_SIZE;
+       num_sectors = FLASH_NUM_SECTORS;
 
        if (NULL != bank->sectors) {
                free(bank->sectors);
@@ -479,11 +471,6 @@ static int cc3220sf_auto_probe(struct flash_bank *bank)
 
        int retval = ERROR_OK;
 
-       if (0 != bank->bank_number) {
-               /* Invalid bank number somehow */
-               return ERROR_FAIL;
-       }
-
        if (!cc3220sf_bank->probed)
                retval = cc3220sf_probe(bank);
 

-- 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to