From: Rafał Miłecki <[email protected]>

I found flash_write_buf() somehow more difficult to follow than needed.
Some code turned out to be inconsistent and some not really needed.

There is a set of 6 patches that should be small enough to make them easy
to review. I was wondering if I should squash patches 5 and 6 but ended up
with sending two smaller diffs.

Those changes shouldn't really change any behaviour (except for smaller mem
alloc). Let me know if there are any issues with this!

Rafał Miłecki (6):
  fw_env: use "erasesize" variable in writing loop
  fw_env: allocate buffer of proper size in flash_write_buf()
  fw_env: add ROUND_UP() helper
  fw_env: unify calculation of "blockstart" in flash_write_buf()
  fw_env: move "erasesize" calculation up in a code
  fw_env: drop unneeded variables from flash_write_buf()

 tools/env/fw_env.c | 47 ++++++++++++++++++----------------------------
 1 file changed, 18 insertions(+), 29 deletions(-)

-- 
2.51.0

Reply via email to