Lines Matching +full:y +full:- +full:min
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
6 * Copyright (c) 2013-2015 Mellanox Technologies, Ltd.
7 * Copyright (c) 2014-2015 François Tigeot
41 #define min(x, y) ((x) < (y) ? (x) : (y)) macro
42 #define max(x, y) ((x) > (y) ? (x) : (y)) argument
44 #define min3(a, b, c) min(a, min(b, c))
47 #define min_not_zero(x, y) ({ \ argument
49 __typeof(y) __min2 = (y); \
50 __min1 == 0 ? __min2 : ((__min2 == 0) ? __min1 : min(__min1, __min2));\
53 #define min_t(type, x, y) ({ \ argument
55 type __min2 = (y); \
58 #define max_t(type, x, y) ({ \ argument
60 type __max2 = (y); \
63 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) argument
64 #define clamp(x, lo, hi) min(max(x, lo), hi)