This is an automated email from Gerrit.

Andrey Smirnov ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/2055

-- gerrit

commit ec3fcbb7f2ce7e386a3c1449839f9e8ebbb2db7b
Author: Andrey Smirnov <[email protected]>
Date:   Mon Mar 17 15:04:09 2014 -0700

    nrf51: Remove unnecessary explicit type casting
    
    Change-Id: I523e81645434760649ea2c00e6f80c2b08d08d94
    Signed-off-by: Andrey Smirnov <[email protected]>

diff --git a/src/flash/nor/nrf51.c b/src/flash/nor/nrf51.c
index 29b0a5f..79b8d42 100644
--- a/src/flash/nor/nrf51.c
+++ b/src/flash/nor/nrf51.c
@@ -203,7 +203,7 @@ static const struct nrf51_device_spec 
nrf51_known_devices_table[] = {
 
 static int nrf51_bank_is_probed(struct flash_bank *bank)
 {
-       struct nrf51_info *chip = (struct nrf51_info *)bank->driver_priv;
+       struct nrf51_info *chip = bank->driver_priv;
 
        assert(chip != NULL);
 
@@ -218,7 +218,7 @@ static int nrf51_get_probed_chip_if_halted(struct 
flash_bank *bank, struct nrf51
                return ERROR_TARGET_NOT_HALTED;
        }
 
-       *chip = (struct nrf51_info *)bank->driver_priv;
+       *chip = bank->driver_priv;
 
        int probed = nrf51_bank_is_probed(bank);
        if (probed < 0)
@@ -357,7 +357,7 @@ static int nrf51_protect_check(struct flash_bank *bank)
        if (bank->base == NRF51_UICR_BASE)
                return ERROR_OK;
 
-       struct nrf51_info *chip = (struct nrf51_info *)bank->driver_priv;
+       struct nrf51_info *chip = bank->driver_priv;
 
        assert(chip != NULL);
 
@@ -443,7 +443,7 @@ static int nrf51_probe(struct flash_bank *bank)
 {
        uint32_t hwid;
        int res;
-       struct nrf51_info *chip = (struct nrf51_info *)bank->driver_priv;
+       struct nrf51_info *chip = bank->driver_priv;
 
        res = target_read_u32(chip->target, NRF51_FICR_CONFIGID, &hwid);
        if (res != ERROR_OK) {
@@ -546,7 +546,7 @@ static int nrf51_auto_probe(struct flash_bank *bank)
 
 static struct flash_sector *nrf51_find_sector_by_address(struct flash_bank 
*bank, uint32_t address)
 {
-       struct nrf51_info *chip = (struct nrf51_info *)bank->driver_priv;
+       struct nrf51_info *chip = bank->driver_priv;
 
        for (int i = 0; i < bank->num_sectors; i++)
                if (bank->sectors[i].offset <= address &&
@@ -625,7 +625,7 @@ static int nrf51_write_page(struct flash_bank *bank, 
uint32_t offset, const uint
 {
        assert(offset % 4 == 0);
        int res = ERROR_FAIL;
-       struct nrf51_info *chip = (struct nrf51_info *)bank->driver_priv;
+       struct nrf51_info *chip = bank->driver_priv;
        struct flash_sector *sector = nrf51_find_sector_by_address(bank, 
offset);
 
        if (!sector)

-- 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to