Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: ALSA: remove unused variables

These variables are never referenced in the code, just remove them.

Signed-off-by: Ding Xiang <dingxiang@cmss.chinamobile.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230908081040.197243-1-dingxiang@cmss.chinamobile.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Ding Xiang and committed by
Takashi Iwai
61ba93b4 0bb80ecc

+5 -12
-1
tools/testing/selftests/alsa/conf.c
··· 431 431 int conf_get_bool(snd_config_t *root, const char *key1, const char *key2, int def) 432 432 { 433 433 snd_config_t *cfg; 434 - long l; 435 434 int ret; 436 435 437 436 if (!root)
+3 -8
tools/testing/selftests/alsa/mixer-test.c
··· 188 188 { 189 189 unsigned short revents; 190 190 snd_ctl_event_t *event; 191 - int count, err; 191 + int err; 192 192 unsigned int mask = 0; 193 193 unsigned int ev_id; 194 194 ··· 430 430 static void test_ctl_name(struct ctl_data *ctl) 431 431 { 432 432 bool name_ok = true; 433 - bool check; 434 433 435 434 ksft_print_msg("%d.%d %s\n", ctl->card->card, ctl->elem, 436 435 ctl->name); ··· 862 863 snd_ctl_elem_value_t *val) 863 864 { 864 865 int err; 865 - long val_read; 866 866 867 867 /* Ideally this will fail... */ 868 868 err = snd_ctl_elem_write(ctl->card->handle, val); ··· 881 883 882 884 static bool test_ctl_write_invalid_boolean(struct ctl_data *ctl) 883 885 { 884 - int err, i; 885 - long val_read; 886 + int i; 886 887 bool fail = false; 887 888 snd_ctl_elem_value_t *val; 888 889 snd_ctl_elem_value_alloca(&val); ··· 991 994 992 995 static bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl) 993 996 { 994 - int err, i; 995 - unsigned int val_read; 997 + int i; 996 998 bool fail = false; 997 999 snd_ctl_elem_value_t *val; 998 1000 snd_ctl_elem_value_alloca(&val); ··· 1023 1027 static void test_ctl_write_invalid(struct ctl_data *ctl) 1024 1028 { 1025 1029 bool pass; 1026 - int err; 1027 1030 1028 1031 /* If the control is turned off let's be polite */ 1029 1032 if (snd_ctl_elem_info_is_inactive(ctl->info)) {
+2 -2
tools/testing/selftests/alsa/pcm-test.c
··· 257 257 static void test_pcm_time(struct pcm_data *data, enum test_class class, 258 258 const char *test_name, snd_config_t *pcm_cfg) 259 259 { 260 - char name[64], key[128], msg[256]; 260 + char name[64], msg[256]; 261 261 const int duration_s = 2, margin_ms = 100; 262 262 const int duration_ms = duration_s * 1000; 263 263 const char *cs; ··· 567 567 { 568 568 struct card_data *card; 569 569 struct pcm_data *pcm; 570 - snd_config_t *global_config, *cfg, *pcm_cfg; 570 + snd_config_t *global_config, *cfg; 571 571 int num_pcm_tests = 0, num_tests, num_std_pcm_tests; 572 572 int ret; 573 573 void *thread_ret;
-1
tools/testing/selftests/alsa/test-pcmtest-driver.c
··· 313 313 */ 314 314 TEST_F(pcmtest, reset_ioctl) { 315 315 snd_pcm_t *handle; 316 - unsigned char *it; 317 316 int test_res; 318 317 struct pcmtest_test_params *params = &self->params; 319 318