提交 a90b6b00 编写于 作者: B Brian Norris 提交者: Zhang Rui

tools/thermal: tmon: add min/max macros

Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
上级 4cc32cb4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册