* [PATCH] selftests/alsa: make dump_config_tree() as void function
@ 2024-05-06 7:54 Jaroslav Kysela
2024-05-06 14:45 ` Mark Brown
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2024-05-06 7:54 UTC (permalink / raw)
To: linux-sound; +Cc: Takashi Iwai, Jaroslav Kysela, John Hubbard, Mark Brown
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
Suggested-by: John Hubbard <jhubbard@nvidia.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
tools/testing/selftests/alsa/conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c
index 89e3656a042d..e2b3a5810f47 100644
--- a/tools/testing/selftests/alsa/conf.c
+++ b/tools/testing/selftests/alsa/conf.c
@@ -105,7 +105,7 @@ static struct card_cfg_data *conf_data_by_card(int card, bool msg)
return NULL;
}
-static int dump_config_tree(snd_config_t *top)
+static void dump_config_tree(snd_config_t *top)
{
snd_output_t *out;
int err;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] selftests/alsa: make dump_config_tree() as void function
2024-05-06 7:54 [PATCH] selftests/alsa: make dump_config_tree() as void function Jaroslav Kysela
@ 2024-05-06 14:45 ` Mark Brown
2024-05-06 16:15 ` Takashi Iwai
2024-05-06 17:39 ` John Hubbard
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-05-06 14:45 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: linux-sound, Takashi Iwai, John Hubbard
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
On Mon, May 06, 2024 at 09:54:19AM +0200, Jaroslav Kysela wrote:
> 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:
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/alsa: make dump_config_tree() as void function
2024-05-06 7:54 [PATCH] selftests/alsa: make dump_config_tree() as void function Jaroslav Kysela
2024-05-06 14:45 ` Mark Brown
@ 2024-05-06 16:15 ` Takashi Iwai
2024-05-06 17:39 ` John Hubbard
2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2024-05-06 16:15 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: linux-sound, Takashi Iwai, John Hubbard, Mark Brown
On Mon, 06 May 2024 09:54:19 +0200,
Jaroslav Kysela wrote:
>
> 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
>
> Suggested-by: John Hubbard <jhubbard@nvidia.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/alsa: make dump_config_tree() as void function
2024-05-06 7:54 [PATCH] selftests/alsa: make dump_config_tree() as void function Jaroslav Kysela
2024-05-06 14:45 ` Mark Brown
2024-05-06 16:15 ` Takashi Iwai
@ 2024-05-06 17:39 ` John Hubbard
2 siblings, 0 replies; 4+ messages in thread
From: John Hubbard @ 2024-05-06 17:39 UTC (permalink / raw)
To: Jaroslav Kysela, linux-sound; +Cc: Takashi Iwai, Mark Brown
On 5/6/24 12:54 AM, Jaroslav Kysela wrote:
> 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
>
> Suggested-by: John Hubbard <jhubbard@nvidia.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
> ---
> tools/testing/selftests/alsa/conf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c
> index 89e3656a042d..e2b3a5810f47 100644
> --- a/tools/testing/selftests/alsa/conf.c
> +++ b/tools/testing/selftests/alsa/conf.c
> @@ -105,7 +105,7 @@ static struct card_cfg_data *conf_data_by_card(int card, bool msg)
> return NULL;
> }
>
> -static int dump_config_tree(snd_config_t *top)
> +static void dump_config_tree(snd_config_t *top)
OK, looks good. :)
> {
> snd_output_t *out;
> int err;
thanks,
--
John Hubbard
NVIDIA
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-06 17:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 7:54 [PATCH] selftests/alsa: make dump_config_tree() as void function Jaroslav Kysela
2024-05-06 14:45 ` Mark Brown
2024-05-06 16:15 ` Takashi Iwai
2024-05-06 17:39 ` John Hubbard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox