diff options
author | Brian Norris <computersforpeace@gmail.com> | 2015-02-18 03:18:30 +0100 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2015-02-28 06:52:47 +0100 |
commit | a90b6b006c616f1a33f8ffb6939e31c8d66926a4 (patch) | |
tree | 5aa8dd93b7a13c54d3419b53a02064ae32b6aada /tools/thermal | |
parent | tools/thermal: tmon: add --target-temp parameter (diff) | |
download | linux-a90b6b006c616f1a33f8ffb6939e31c8d66926a4.tar.xz linux-a90b6b006c616f1a33f8ffb6939e31c8d66926a4.zip |
tools/thermal: tmon: add min/max macros
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'tools/thermal')
-rw-r--r-- | tools/thermal/tmon/tui.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c index 89f8ef0e15c8..43c5aecf71da 100644 --- a/tools/thermal/tmon/tui.c +++ b/tools/thermal/tmon/tui.c @@ -30,6 +30,18 @@ #include "tmon.h" +#define min(x, y) ({ \ + typeof(x) _min1 = (x); \ + typeof(y) _min2 = (y); \ + (void) (&_min1 == &_min2); \ + _min1 < _min2 ? _min1 : _min2; }) + +#define max(x, y) ({ \ + typeof(x) _max1 = (x); \ + typeof(y) _max2 = (y); \ + (void) (&_max1 == &_max2); \ + _max1 > _max2 ? _max1 : _max2; }) + static PANEL *data_panel; static PANEL *dialogue_panel; static PANEL *top; |