From a9608871692be6cda4d73ae837b4313747370ff8 Mon Sep 17 00:00:00 2001 From: Tomas Vanek Date: Fri, 16 Aug 2024 22:53:36 +0200 Subject: [PATCH] flash/nor/rp2xxx: drop couple of Java-like const The compiler knows what variable remains constant during its lifetime and there is no need to emphasise constantness. Change-Id: Ib515f96a3c77afea87274f33b8ccac7a71bfb932 Signed-off-by: Tomas Vanek Reviewed-on: https://review.openocd.org/c/openocd/+/8459 Tested-by: jenkins Reviewed-by: Jonathan Bell --- src/flash/nor/rp2xxx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flash/nor/rp2xxx.c b/src/flash/nor/rp2xxx.c index 909d3f14d..5d0255b61 100644 --- a/src/flash/nor/rp2xxx.c +++ b/src/flash/nor/rp2xxx.c @@ -223,7 +223,7 @@ static int rp2040_lookup_rom_symbol(struct target *target, uint16_t tag, uint16_ } uint16_t ptr_to_entry; - const unsigned int offset_magic_to_table_ptr = flags == RT_FLAG_DATA ? 6 : 4; + unsigned int offset_magic_to_table_ptr = flags == RT_FLAG_DATA ? 6 : 4; int err = target_read_u16(target, BOOTROM_MAGIC_ADDR + offset_magic_to_table_ptr, &ptr_to_entry); if (err != ERROR_OK) return err; @@ -390,8 +390,8 @@ static int rp2xxx_lookup_rom_symbol(struct target *target, uint16_t tag, uint16_ static int rp2xxx_populate_rom_pointer_cache(struct target *target, struct rp2xxx_flash_bank *priv) { - const uint16_t symtype_func = is_arm(target_to_arm(target)) - ? RT_FLAG_FUNC_ARM_SEC : RT_FLAG_FUNC_RISCV; + uint16_t symtype_func = is_arm(target_to_arm(target)) + ? RT_FLAG_FUNC_ARM_SEC : RT_FLAG_FUNC_RISCV; int err; err = rp2xxx_lookup_rom_symbol(target, FUNC_FLASH_EXIT_XIP, symtype_func, &priv->jump_flash_exit_xip); -- 2.50.1