]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
flash/nor/rsl10: drop unused `rsl10_info` in `rsl10_protect_check()`
authorEvgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Wed, 12 Feb 2025 18:12:30 +0000 (21:12 +0300)
committerTomas Vanek <vanekt@fbl.cz>
Fri, 21 Feb 2025 21:20:15 +0000 (21:20 +0000)
`struct rsl10_info *chip` is only used in `rsl10_protect_check()` in an
assertion triggerring `-Wunused-variable` when compiled with `DNDEBUG`.
Drop it.

Change-Id: Ib302aea742131479f04f32e8fe8a88a3230ae203
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8755
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/rsl10.c

index c286e9ac88d4aa493f51b59cda23c5507f8df225..c33099787aee8aba0011e507b12062d306c8d689 100644 (file)
@@ -155,11 +155,6 @@ static int rsl10_get_probed_chip_if_halted(struct flash_bank *bank, struct rsl10
 
 static int rsl10_protect_check(struct flash_bank *bank)
 {
-       struct rsl10_bank *nbank = bank->driver_priv;
-       struct rsl10_info *chip  = nbank->chip;
-
-       assert(chip);
-
        uint32_t status;
 
        int retval = target_read_u32(bank->target, RSL10_FLASH_REG_IF_STATUS, &status);