Skip to content
Snippets Groups Projects
Commit 155cfb5e authored by Anton Staaf's avatar Anton Staaf Committed by Wolfgang Denk
Browse files

common: fix behavior of ROUND macro when input is already rounded

Currently when you call ROUND with a value that is already a
multiple of the second parameter it will return a value that is
one multiple larger, instead of returning the value passed in.

There are only two types of usage of ROUND currently, one in
various config files to round CONFIG_SYS_MALLOC_LEN to a multiple
of 4096 bytes.  The other in cmd_sf.c where the incorrect behavior
of ROUND is worked around be subtracting one from the length argument
before passing it to ROUND.

This patch fixes ROUND and removes the workaround from cmd_sf.  It
also results in all of the malloc pools that use ROUND to compute
their size shrinking by 4KB.

Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Mike Frysinger <vapier@gentoo.org>
parent 49ea2e34
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment