]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: cs-amp-lib-test: Force test calibration blob entries to be valid
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 22 Aug 2024 11:57:25 +0000 (12:57 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 22 Aug 2024 12:42:40 +0000 (13:42 +0100)
commitbff980d8d9ca537fd5f3c0e9a99876c1e3713e81
treea00d73d309e7435fe382a37e1226916b139edfa0
parent5f7c98b7519a3a847d9182bd99d57ea250032ca1
ASoC: cs-amp-lib-test: Force test calibration blob entries to be valid

For a normal calibration blob the calTarget values must be non-zero and
unique, and the calTime values must be non-zero. Don't rely on
get_random_bytes() to be random enough to guarantee this. Force the
calTarget and calTime values to be valid while retaining randomness
in the values.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: 177862317a98 ("ASoC: cs-amp-lib: Add KUnit test for calibration helpers")
Link: https://patch.msgid.link/20240822115725.259568-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs-amp-lib-test.c