[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sun, 5 May 2024 14:08:24 -0700
From: John Hubbard <jhubbard@...dia.com>
To: Shuah Khan <shuah@...nel.org>
Cc: Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Ivan Orlov <ivan.orlov0322@...il.com>,
linux-sound@...r.kernel.org,
Valentin Obst <kernel@...entinobst.de>,
linux-kselftest@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
llvm@...ts.linux.dev,
John Hubbard <jhubbard@...dia.com>
Subject: [PATCH v2] selftests/alsa: missing a return value in unused dump_config_tree()
dump_config_tree() is declared to return an int, but the compiler cannot
prove that it always returns any value at all. This leads to a clang
warning, when building via:
make LLVM=1 -C tools/testing/selftests
Furthermore, Mark Brown noticed that dump_config_tree() isn't even used
anymore, so just delete the entire function.
Cc: Mark Brown <broonie@...nel.org>
Signed-off-by: John Hubbard <jhubbard@...dia.com>
---
tools/testing/selftests/alsa/conf.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c
index 89e3656a042d..357561c1759b 100644
--- a/tools/testing/selftests/alsa/conf.c
+++ b/tools/testing/selftests/alsa/conf.c
@@ -105,19 +105,6 @@ static struct card_cfg_data *conf_data_by_card(int card, bool msg)
return NULL;
}
-static int dump_config_tree(snd_config_t *top)
-{
- snd_output_t *out;
- int err;
-
- err = snd_output_stdio_attach(&out, stdout, 0);
- if (err < 0)
- ksft_exit_fail_msg("stdout attach\n");
- if (snd_config_save(top, out))
- ksft_exit_fail_msg("config save\n");
- snd_output_close(out);
-}
-
snd_config_t *conf_load_from_file(const char *filename)
{
snd_config_t *dst;
base-commit: f462ae0edd3703edd6f22fe41d336369c38b884b
prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27
--
2.45.0
Powered by blists - more mailing lists