flashrom.c: Rewrite calculate_block_count()
There is not need to do address calculations in calculate_block_count().
We only want to return the final count, so only add that up. As a bonus,
we only need to pass the eraser and not the whole chip reference.
Change-Id: I0cdfaad85aeda90513268d08da47acbe72ca57e5
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
1 file changed