1CLAMP(9) Driver Basics CLAMP(9)
23
4
NAME
6clamp - return a value clamped to a given range with strict
7typechecking
8
SYNOPSIS
10clamp(val, min, max);
11
ARGUMENTS
13val
14current value
1516
min
17minimum allowable value
1819
max
20maximum allowable value
21
DESCRIPTION
23This macro does strict typechecking of min/max to make sure they are of
24the same type as val. See the unnecessary pointer comparisons.
25
COPYRIGHT
27Kernel Hackers Manual 2.6. June 2019 CLAMP(9)