summaryrefslogtreecommitdiff
path: root/core/cortex-m/ec.lds.S
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2021-10-12 23:36:46 +0000
committerCommit Bot <commit-bot@chromium.org>2021-10-15 21:50:02 +0000
commit833baa422d10783531c3293afc8b7ce94a1c846a (patch)
tree1839bb180a934c60a460d2c18021112b5d0b4372 /core/cortex-m/ec.lds.S
parentc389ca4c78520fd816e4471a4e7d3ba571fc9a58 (diff)
downloadchrome-ec-833baa422d10783531c3293afc8b7ce94a1c846a.tar.gz
core/cortex-m: Invert if statement for readability
BRANCH=none BUG=b:172020503 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I39f9d35b22d25c923a768bf86b3a16413b9f0a4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3219871 Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'core/cortex-m/ec.lds.S')
-rw-r--r--core/cortex-m/ec.lds.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index 1c9402ebde..b97f17382c 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -506,15 +506,15 @@ SECTIONS
__flash_used = FLASH_USED_END - ORIGIN(EC_IMAGE_LMA_MEM_REGION);
__flash_size = LENGTH(EC_IMAGE_LMA_MEM_REGION);
#ifndef CONFIG_CHIP_INIT_ROM_REGION
-#if !(defined(SECTION_IS_RW) && (CONFIG_FLASH_WRITE_SIZE > 4))
- __image_size = __flash_used;
-#else
+#if defined(SECTION_IS_RW) && (CONFIG_FLASH_WRITE_SIZE > 4)
.rw_image_size_alignment FLASH_USED_END : AT(FLASH_USED_END)
{
. = ALIGN (CONFIG_FLASH_WRITE_SIZE);
} > FLASH = 0xFF
__image_size = __flash_used + SIZEOF(.rw_image_size_alignment);
+#else
+ __image_size = __flash_used;
#endif
#if defined(SECTION_IS_RW) && (CONFIG_FLASH_WRITE_SIZE > 0)
/* Alignment is needed by flash_command_write() for RW update. */