diff options
author | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2013-09-28 21:43:37 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-10-31 20:43:27 +0000 |
commit | ba2fbe22470915359e1905aaad4c613eacbdf6dc (patch) | |
tree | 701c642d7bd3badb2b97b971cce811c4140e778b /src/flash | |
parent | 704082443d03cdeba9c89a8f70d1f1017330d903 (diff) | |
download | riscv-openocd-ba2fbe22470915359e1905aaad4c613eacbdf6dc.zip riscv-openocd-ba2fbe22470915359e1905aaad4c613eacbdf6dc.tar.gz riscv-openocd-ba2fbe22470915359e1905aaad4c613eacbdf6dc.tar.bz2 |
Remove unnecessary casts
Change-Id: Ia97283707282ccccdc707c969f59337313b4e291
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/1767
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash')
-rw-r--r-- | src/flash/nand/tcl.c | 2 | ||||
-rw-r--r-- | src/flash/nor/at91sam3.c | 2 | ||||
-rw-r--r-- | src/flash/nor/at91sam4.c | 2 | ||||
-rw-r--r-- | src/flash/nor/cfi.c | 4 | ||||
-rw-r--r-- | src/flash/nor/efm32.c | 3 | ||||
-rw-r--r-- | src/flash/nor/em357.c | 2 | ||||
-rw-r--r-- | src/flash/nor/mdr.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stellaris.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stm32f2x.c | 2 | ||||
-rw-r--r-- | src/flash/nor/stm32lx.c | 2 |
10 files changed, 11 insertions, 12 deletions
diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index e0db863..20854c7 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -500,7 +500,7 @@ COMMAND_HANDLER(handle_nand_init_command) static int nand_list_walker(struct nand_flash_controller *c, void *x) { - struct command_context *cmd_ctx = (struct command_context *)x; + struct command_context *cmd_ctx = x; command_print(cmd_ctx, " %s", c->name); return ERROR_OK; } diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index fdae964..a05ab16 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -2731,7 +2731,7 @@ static const struct sam3_reg_list sam3_all_regs[] = { static struct sam3_bank_private *get_sam3_bank_private(struct flash_bank *bank) { - return (struct sam3_bank_private *)(bank->driver_priv); + return bank->driver_priv; } /** diff --git a/src/flash/nor/at91sam4.c b/src/flash/nor/at91sam4.c index f34ca4f..cda74f9 100644 --- a/src/flash/nor/at91sam4.c +++ b/src/flash/nor/at91sam4.c @@ -1398,7 +1398,7 @@ static const struct sam4_reg_list sam4_all_regs[] = { static struct sam4_bank_private *get_sam4_bank_private(struct flash_bank *bank) { - return (struct sam4_bank_private *)(bank->driver_priv); + return bank->driver_priv; } /** diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c index 2ade84a..5724c18 100644 --- a/src/flash/nor/cfi.c +++ b/src/flash/nor/cfi.c @@ -2506,9 +2506,9 @@ static void cfi_fixup_0002_unlock_addresses(struct flash_bank *bank, const void static void cfi_fixup_0002_polling_bits(struct flash_bank *bank, const void *param) { struct cfi_flash_bank *cfi_info = bank->driver_priv; - const int status_poll_mask = *(const int *)param; + const int *status_poll_mask = param; - cfi_info->status_poll_mask = status_poll_mask; + cfi_info->status_poll_mask = *status_poll_mask; } diff --git a/src/flash/nor/efm32.c b/src/flash/nor/efm32.c index eab1133..2c20add 100644 --- a/src/flash/nor/efm32.c +++ b/src/flash/nor/efm32.c @@ -578,8 +578,7 @@ static int efm32x_write_block(struct flash_bank *bank, uint8_t *buf, }; ret = target_write_buffer(target, write_algorithm->address, - sizeof(efm32x_flash_write_code), - (uint8_t *)efm32x_flash_write_code); + sizeof(efm32x_flash_write_code), efm32x_flash_write_code); if (ret != ERROR_OK) return ret; diff --git a/src/flash/nor/em357.c b/src/flash/nor/em357.c index 8f25a89..56f44b3 100644 --- a/src/flash/nor/em357.c +++ b/src/flash/nor/em357.c @@ -505,7 +505,7 @@ static int em357_write_block(struct flash_bank *bank, uint8_t *buffer, ; retval = target_write_buffer(target, write_algorithm->address, - sizeof(em357_flash_write_code), (uint8_t *)em357_flash_write_code); + sizeof(em357_flash_write_code), em357_flash_write_code); if (retval != ERROR_OK) return retval; diff --git a/src/flash/nor/mdr.c b/src/flash/nor/mdr.c index 46ad752..3ecee1c 100644 --- a/src/flash/nor/mdr.c +++ b/src/flash/nor/mdr.c @@ -258,7 +258,7 @@ static int mdr_write_block(struct flash_bank *bank, uint8_t *buffer, }; retval = target_write_buffer(target, write_algorithm->address, - sizeof(mdr32fx_flash_write_code), (uint8_t *)mdr32fx_flash_write_code); + sizeof(mdr32fx_flash_write_code), mdr32fx_flash_write_code); if (retval != ERROR_OK) return retval; diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 4e04322..71debdc 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -1042,7 +1042,7 @@ static int stellaris_write_block(struct flash_bank *bank, target_write_buffer(target, write_algorithm->address, sizeof(stellaris_write_code), - (uint8_t *) stellaris_write_code); + stellaris_write_code); armv7m_info.common_magic = ARMV7M_COMMON_MAGIC; armv7m_info.core_mode = ARM_MODE_THREAD; diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c index 1dee623..be96d98 100644 --- a/src/flash/nor/stm32f2x.c +++ b/src/flash/nor/stm32f2x.c @@ -541,7 +541,7 @@ static int stm32x_write_block(struct flash_bank *bank, uint8_t *buffer, retval = target_write_buffer(target, write_algorithm->address, sizeof(stm32x_flash_write_code), - (uint8_t *)stm32x_flash_write_code); + stm32x_flash_write_code); if (retval != ERROR_OK) return retval; diff --git a/src/flash/nor/stm32lx.c b/src/flash/nor/stm32lx.c index d36e518..b1c8eca 100644 --- a/src/flash/nor/stm32lx.c +++ b/src/flash/nor/stm32lx.c @@ -259,7 +259,7 @@ static int stm32lx_write_half_pages(struct flash_bank *bank, uint8_t *buffer, retval = target_write_buffer(target, write_algorithm->address, sizeof(stm32lx_flash_write_code), - (uint8_t *)stm32lx_flash_write_code); + stm32lx_flash_write_code); if (retval != ERROR_OK) { target_free_working_area(target, write_algorithm); return retval; |