[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240107173704.937824-2-mirsad.todorovac@alu.unizg.hr>
Date: Sun, 7 Jan 2024 18:37:02 +0100
From: Mirsad Todorovac <mirsad.todorovac@....unizg.hr>
To: Nícolas F. R. A. Prado <nfraprado@...labora.com>,
Mark Brown <broonie@...nel.org>,
linux-sound@...r.kernel.org,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Shuah Khan <shuah@...nel.org>,
Mirsad Todorovac <mirsad.todorovac@....unizg.hr>
Subject: [PATCH v2 1/4] kselftest/alsa - mixer-test: fix the number of parameters to ksft_exit_fail_msg()
Minor fix in the number of arguments to error reporting function in the
test program as reported by GCC 13.2.0 warning.
mixer-test.c: In function ‘find_controls’:
mixer-test.c:169:44: warning: too many arguments for format [-Wformat-extra-args]
169 | ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The number of arguments in call to ksft_exit_fail_msg() doesn't correspond
to the format specifiers, so this is adjusted resembling the sibling calls
to the error function.
Fixes: b1446bda56456 ("kselftest: alsa: Check for event generation when we write to controls")
Cc: Mark Brown <broonie@...nel.org>
Cc: Jaroslav Kysela <perex@...ex.cz>
Cc: Takashi Iwai <tiwai@...e.com>
Cc: Shuah Khan <shuah@...nel.org>
Cc: linux-sound@...r.kernel.org
Cc: linux-kselftest@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Signed-off-by: Mirsad Todorovac <mirsad.todorovac@....unizg.hr>
Acked-by: Mark Brown <broonie@...nel.org>
---
v1 -> v2:
Changed the subject line as suggested to reflect the style of the subsystem.
No change to the reviewed code.
tools/testing/selftests/alsa/mixer-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/alsa/mixer-test.c b/tools/testing/selftests/alsa/mixer-test.c
index 23df154fcdd7..208c2170c074 100644
--- a/tools/testing/selftests/alsa/mixer-test.c
+++ b/tools/testing/selftests/alsa/mixer-test.c
@@ -166,7 +166,7 @@ static void find_controls(void)
err = snd_ctl_poll_descriptors(card_data->handle,
&card_data->pollfd, 1);
if (err != 1) {
- ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n",
+ ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for card %d: %d\n",
card, err);
}
--
2.40.1
Powered by blists - more mailing lists