Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10879
-gerrit
commit 6dc055404f9512a387108324db34ebc68f991c3f Author: Julius Werner jwerner@chromium.org Date: Thu Jul 9 15:47:07 2015 -0700
libpayload: Fix arithmetic precedence in div_round_up()
Well, this is just embarrassing...
BRANCH=None BUG=None TEST=None
Change-Id: I7c443d2100b6861d736320ac14c1bd9965937a66 Signed-off-by: Patrick Georgi pgeorgi@chromium.org Original-Commit-Id: 455e3784882ea1b76bcf8e17724869e37d9c629d Original-Change-Id: Ia33e98aeaa8e78e3e3d2c7547e673a623ea86ce2 Original-Signed-off-by: Julius Werner jwerner@chromium.org Original-Reviewed-on: https://chromium-review.googlesource.com/284596 Original-Reviewed-by: Duncan Laurie dlaurie@chromium.org --- payloads/libpayload/include/libpayload.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h index c09fc17..8f17b58 100644 --- a/payloads/libpayload/include/libpayload.h +++ b/payloads/libpayload/include/libpayload.h @@ -64,7 +64,7 @@ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-static inline u32 div_round_up(u32 n, u32 d) { return n + d - 1 / d; } +static inline u32 div_round_up(u32 n, u32 d) { return (n + d - 1) / d; }
#define LITTLE_ENDIAN 1234 #define BIG_ENDIAN 4321