aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorAndrey Smirnov <[email protected]>2018-12-20 23:28:40 -0800
committerGreg Kroah-Hartman <[email protected]>2019-01-22 10:23:17 +0100
commit2ef8179bb7a6817de3fc9407ab55aa357f2d1e4d (patch)
treec332bc00c3006f2d0a347e1a1409c169d37d9d34 /tools/perf/scripts/python/mem-phys-addr.py
parent9fb4ab4d3dd665a62da9c176a89e7c7feaf5d9e4 (diff)
tools/firmware/ihex2fw: Simplify next record offset calculation
We can convert original expression for 'writelen" to use ALIGN as follows: (p->len + 9) & ~3 => (p->len + 6 + 3) & ~3 => ALIGN(p->len + 6, 4) Now, subsituting "p->len + 6" with "p->len + sizeof(p->addr) + sizeof(p->len)" we end up with the same expression as used by kernel couterpart in linux/ihex.h: ALIGN(p->len + sizeof(p->addr) + sizeof(p->len), 4) That is a full size of the record, aligned to 4 bytes. No functional change intended. Cc: Chris Healy <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: linux-kernel <[email protected]> Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions