projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc2aca9
)
util_math: add MAX3 macro
author
Emil Velikov
<emil.l.velikov@gmail.com>
Mon, 7 Sep 2015 13:13:32 +0000
(14:13 +0100)
committer
Emil Velikov
<emil.l.velikov@gmail.com>
Mon, 21 Sep 2015 16:42:51 +0000
(17:42 +0100)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
util_math.h
patch
|
blob
|
history
diff --git
a/util_math.h
b/util_math.h
index
3bc5f64
..
02b15a8
100644
(file)
--- a/
util_math.h
+++ b/
util_math.h
@@
-26,6
+26,7
@@
#define MIN2( A, B ) ( (A)<(B) ? (A) : (B) )
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
+#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
#define __align_mask(value, mask) (((value) + (mask)) & ~(mask))
#define ALIGN(value, alignment) __align_mask(value, (typeof(value))((alignment) - 1))