summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-07-09 15:47:07 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-07-13 09:19:42 +0200
commit6df355da879797899eb6337eb21868163c1ee07d (patch)
tree4f06ca6599d91e096227381f0727d6f07a8a7725 /payloads/libpayload
parent3ae5044b7330ea4af0214b7db29749eed17f2e66 (diff)
downloadcoreboot-6df355da879797899eb6337eb21868163c1ee07d.tar.xz
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> Reviewed-on: http://review.coreboot.org/10879 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Martin Roth <gaumless@gmail.com>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/include/libpayload.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index c09fc172ef..8f17b58fcb 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