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>
This commit is contained in:
parent
3ae5044b73
commit
6df355da87
|
@ -64,7 +64,7 @@
|
||||||
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||||
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
|
#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 LITTLE_ENDIAN 1234
|
||||||
#define BIG_ENDIAN 4321
|
#define BIG_ENDIAN 4321
|
||||||
|
|
Loading…
Reference in New Issue