mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
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>
This commit is contained in:
parent
4cc32cb4e9
commit
a90b6b006c
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue