From c500e720e3081541198a5b235a085f02ef5da5cd Mon Sep 17 00:00:00 2001 From: dragonmux Date: Tue, 9 Aug 2022 08:06:30 +0100 Subject: [PATCH] stm32g0: Removed some more unnecessary casts --- src/target/stm32g0.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/target/stm32g0.c b/src/target/stm32g0.c index 47cd27c..37ed9c8 100644 --- a/src/target/stm32g0.c +++ b/src/target/stm32g0.c @@ -210,26 +210,26 @@ bool stm32g0_probe(target *t) switch (t->part_id) { case STM32G03_4: /* SRAM 8 kiB, Flash up to 64 kiB */ - ram_size = (uint32_t)RAM_SIZE_G03_4; - flash_size = (uint32_t)FLASH_SIZE_MAX_G03_4; + ram_size = RAM_SIZE_G03_4; + flash_size = FLASH_SIZE_MAX_G03_4; t->driver = "STM32G03/4"; break; case STM32G05_6: /* SRAM 18 kiB, Flash up to 64 kiB */ - ram_size = (uint32_t)RAM_SIZE_G05_6; - flash_size = (uint32_t)FLASH_SIZE_MAX_G05_6; + ram_size = RAM_SIZE_G05_6; + flash_size = FLASH_SIZE_MAX_G05_6; t->driver = "STM32G05/6"; break; case STM32G07_8: /* SRAM 36 kiB, Flash up to 128 kiB */ - ram_size = (uint32_t)RAM_SIZE_G07_8; - flash_size = (uint32_t)FLASH_SIZE_MAX_G07_8; + ram_size = RAM_SIZE_G07_8; + flash_size = FLASH_SIZE_MAX_G07_8; t->driver = "STM32G07/8"; break; case STM32G0B_C: /* SRAM 144 kiB, Flash up to 512 kiB */ - ram_size = (uint32_t)RAM_SIZE_G0B_C; - flash_size = (size_t)target_mem_read16(t, FLASH_MEMORY_SIZE); + ram_size = RAM_SIZE_G0B_C; + flash_size = target_mem_read16(t, FLASH_MEMORY_SIZE); flash_size *= 1024U; t->driver = "STM32G0B/C"; break;