forked from auracaster/openocd
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>
This commit is contained in:
committed by
Spencer Oliver
parent
704082443d
commit
ba2fbe2247
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user