Skip to content

Commit

Permalink
mspm0: Remove assert
Browse files Browse the repository at this point in the history
* Both conditions are true due to all calls in target_flash.c being
  `flash->write(..., flash->writesize)` or
  `flash->erase(..., flash->blocksize)`
  • Loading branch information
ALTracer committed Nov 15, 2024
1 parent ab82812 commit 234947d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/target/mspm0.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "buffer_utils.h"
#include "jep106.h"
#include "cortex.h"
#include <assert.h>

#define MSPM0_CONFIG_FLASH_DUMP_SUPPORT (CONFIG_BMDA == 1 || ENABLE_DEBUG == 1)

Expand Down Expand Up @@ -292,8 +291,9 @@ static void mspm0_flash_unprotect_sector(target_flash_s *const target_flash, con

static bool mspm0_flash_erase(target_flash_s *const target_flash, const target_addr_t addr, const size_t length)
{
#ifdef DEBUG_TARGET_IS_NOOP
(void)length;
assert(length == target_flash->blocksize);
#endif

target_s *const target = target_flash->t;

Expand All @@ -318,8 +318,9 @@ static bool mspm0_flash_erase(target_flash_s *const target_flash, const target_a
static bool mspm0_flash_write(
target_flash_s *const target_flash, target_addr_t dest, const void *const src, const size_t length)
{
#ifdef DEBUG_TARGET_IS_NOOP
(void)length;
assert(length == target_flash->writesize);
#endif

target_s *const target = target_flash->t;

Expand Down

0 comments on commit 234947d

Please sign in to comment.