mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
lib/test_linear_ranges: Use LINEAR_RANGE()
New initialization macro for linear ranges was added. Slightly simplify the test code by using this macro - and at the same time also verify the macro is working as intended. Use the newly added LINEAR_RANGE() initialization macro for linear range test. Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/Y3R13IRrs+x5PcZ4@dc75zzyyyyyyyyyyyyydt-3.rev.dnainternet.fi Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b8dfb3bed5
commit
bc64f30eb9
1 changed files with 2 additions and 11 deletions
|
@ -107,17 +107,8 @@ static const unsigned int range2_vals[] = { RANGE2_MIN, RANGE2_MIN +
|
||||||
#define SMALLEST_VAL RANGE1_MIN
|
#define SMALLEST_VAL RANGE1_MIN
|
||||||
|
|
||||||
static struct linear_range testr[] = {
|
static struct linear_range testr[] = {
|
||||||
{
|
LINEAR_RANGE(RANGE1_MIN, RANGE1_MIN_SEL, RANGE1_MAX_SEL, RANGE1_STEP),
|
||||||
.min = RANGE1_MIN,
|
LINEAR_RANGE(RANGE2_MIN, RANGE2_MIN_SEL, RANGE2_MAX_SEL, RANGE2_STEP),
|
||||||
.min_sel = RANGE1_MIN_SEL,
|
|
||||||
.max_sel = RANGE1_MAX_SEL,
|
|
||||||
.step = RANGE1_STEP,
|
|
||||||
}, {
|
|
||||||
.min = RANGE2_MIN,
|
|
||||||
.min_sel = RANGE2_MIN_SEL,
|
|
||||||
.max_sel = RANGE2_MAX_SEL,
|
|
||||||
.step = RANGE2_STEP
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void range_test_get_value(struct kunit *test)
|
static void range_test_get_value(struct kunit *test)
|
||||||
|
|
Loading…
Reference in a new issue