ALSA: kunit: Fix sparse warnings
authorTakashi Iwai <tiwai@suse.de>
Tue, 27 Feb 2024 10:49:12 +0000 (11:49 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Feb 2024 14:00:18 +0000 (15:00 +0100)
commit9301a412303725ae511229c22ea0f326ad47ad07
tree083778621960a0d8ceb09e803ff6a24a7385d1d9
parenta55bc334d3dfbfdc075632a144e821a564da38d5
ALSA: kunit: Fix sparse warnings

There were a few sparse warnings about the cast of strong-typed
snd_pcm_format_t.  Fix them with cast with __force.

For spreading the ugly mess, put them in the definitions
WRONG_FORMAT_1 and WRONG_FORMAT_2 and use them in the callers.

Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202402270303.PmvmQrJV-lkp@intel.com
Link: https://lore.kernel.org/r/20240227104912.18921-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/sound_kunit.c