diff mbox series

[05/15] binman: Avoid setting the image_pos attribute directly

Message ID 20240826191143.426387-6-sjg@chromium.org
State New
Delegated to: Simon Glass
Headers show
Series binman: More patches to support VBE | expand

Commit Message

Simon Glass Aug. 26, 2024, 7:11 p.m. UTC
Two places set this attribute directly. Update them to use the function
provided.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/etype/atf_fip.py | 2 +-
 tools/binman/etype/cbfs.py    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tools/binman/etype/atf_fip.py b/tools/binman/etype/atf_fip.py
index 73a3f85b9f4..4d84e96c376 100644
--- a/tools/binman/etype/atf_fip.py
+++ b/tools/binman/etype/atf_fip.py
@@ -248,7 +248,7 @@  class Entry_atf_fip(Entry_section):
             fent = entry._fip_entry
             entry.size = fent.size
             entry.offset = fent.offset
-            entry.image_pos = self.image_pos + entry.offset
+            entry.SetImagePos(image_pos + self.offset)
 
     def ReadChildData(self, child, decomp=True, alt_format=None):
         if not self.reader:
diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py
index 575aa624f6c..124fa1e4ffc 100644
--- a/tools/binman/etype/cbfs.py
+++ b/tools/binman/etype/cbfs.py
@@ -245,7 +245,7 @@  class Entry_cbfs(Entry):
             cfile = entry._cbfs_file
             entry.size = cfile.data_len
             entry.offset = cfile.calced_cbfs_offset
-            entry.image_pos = self.image_pos + entry.offset
+            entry.SetImagePos(image_pos + self.offset)
             if entry._cbfs_compress:
                 entry.uncomp_size = cfile.memlen