Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Commit b92f286

Browse files
committed
fixup! target_flash: Log flash_prepare() calls
1 parent bfe13a6 commit b92f286

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/target/target_flash.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ static bool flash_prepare(target_flash_s *flash, flash_operation_e operation)
8989
if (flash->operation == operation)
9090
return true;
9191

92+
#ifndef DEBUG_TARGET_IS_NOOP
93+
const char *const flash_operation_name[4] = {"none", "erase", "mass", "write"};
94+
#endif
9295
bool result = true;
9396
/* Terminate any ongoing Flash operation */
9497
if (flash->operation != FLASH_OPERATION_NONE)
@@ -99,10 +102,7 @@ static bool flash_prepare(target_flash_s *flash, flash_operation_e operation)
99102
flash->operation = operation;
100103
/* Prepare flash for operation, unless we failed to terminate the previous one */
101104
if (flash->prepare) {
102-
#ifndef DEBUG_TARGET_IS_NOOP
103-
const char *const flash_operation_name[4] = {"none", "erase", "mass", "write"};
104105
DEBUG_TARGET("%s (for %s)\n", __func__, flash_operation_name[operation]);
105-
#endif
106106
result = flash->prepare(flash);
107107
}
108108

0 commit comments

Comments
 (0)