diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-05-15 08:07:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-05-21 13:04:13 +0200 |
commit | 27d7f5dcb305de87cfe1002a2ea47774334ccbff (patch) | |
tree | 93ca7e298cd5b8f64d8b3e7f0e131a2d4a81c993 /board/evb4510/memsetup.S | |
parent | 84d8445e0dfb6eda67c66cfc4bc299f0836ecf91 (diff) | |
download | barebox-master.tar.gz barebox-master.tar.xz |
Newer toolchains rightly complain:
scripts/pblimage.c:259:17: error: ignoring return value of ‘read’ declared
with attribute ‘warn_unused_result’ [-Werror=unused-result]
259 | read(in_fd, mem_buf + 0x1000, image_size);
In the ls1046a case, this doesn't happen, because pbl_fget is used,
which does a number of things:
- report warnings and exit on read errors
- fill buffer with 0xff on short reads
- increment pmem_buf and pbl_size by the number of bytes emitted
All of which, sound like a good idea for the ls1028a as well. Therefore,
initialize pmem_buf and pbl_size to the correct value and use pbl_fget.
This makes the code easier to follow through by making it explicit that
the image's payload is always given a 4K alignment, independent of the
size of the image header.
This change has only been build-tested.
Fixes: d5e5a65c2b64 ("pblimage: Add LS1028a support")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240515060758.3580734-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'board/evb4510/memsetup.S')
0 files changed, 0 insertions, 0 deletions