* [PATCH] selftests/alsa:Fix printf format string in pcm-test.c
@ 2024-06-26 8:48 Zhu Jun
2024-06-26 16:12 ` Mark Brown
2024-06-27 7:57 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Zhu Jun @ 2024-06-26 8:48 UTC (permalink / raw)
To: perex
Cc: tiwai, shuah, linux-kernel, linux-kselftest, linux-sound, broonie,
zhujun2
Inside of test_pcm_time() arguments are printed via printf
but '%d' is used to print @flags (of type unsigned int).
Use '%u' instead, just like we do everywhere else.
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
---
tools/testing/selftests/alsa/pcm-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/alsa/pcm-test.c b/tools/testing/selftests/alsa/pcm-test.c
index de664dedb541..914efcdce1ec 100644
--- a/tools/testing/selftests/alsa/pcm-test.c
+++ b/tools/testing/selftests/alsa/pcm-test.c
@@ -383,7 +383,7 @@ static void test_pcm_time(struct pcm_data *data, enum test_class class,
goto __close;
}
if (rrate != rate) {
- snprintf(msg, sizeof(msg), "rate mismatch %ld != %d", rate, rrate);
+ snprintf(msg, sizeof(msg), "rate mismatch %ld != %u", rate, rrate);
goto __close;
}
rperiod_size = period_size;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/alsa:Fix printf format string in pcm-test.c
2024-06-26 8:48 [PATCH] selftests/alsa:Fix printf format string in pcm-test.c Zhu Jun
@ 2024-06-26 16:12 ` Mark Brown
2024-06-27 7:57 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2024-06-26 16:12 UTC (permalink / raw)
To: Zhu Jun; +Cc: perex, tiwai, shuah, linux-kernel, linux-kselftest, linux-sound
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
On Wed, Jun 26, 2024 at 01:48:59AM -0700, Zhu Jun wrote:
> Inside of test_pcm_time() arguments are printed via printf
> but '%d' is used to print @flags (of type unsigned int).
> Use '%u' instead, just like we do everywhere else.
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/alsa:Fix printf format string in pcm-test.c
2024-06-26 8:48 [PATCH] selftests/alsa:Fix printf format string in pcm-test.c Zhu Jun
2024-06-26 16:12 ` Mark Brown
@ 2024-06-27 7:57 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2024-06-27 7:57 UTC (permalink / raw)
To: Zhu Jun
Cc: perex, tiwai, shuah, linux-kernel, linux-kselftest, linux-sound,
broonie
On Wed, 26 Jun 2024 10:48:59 +0200,
Zhu Jun wrote:
>
> Inside of test_pcm_time() arguments are printed via printf
> but '%d' is used to print @flags (of type unsigned int).
> Use '%u' instead, just like we do everywhere else.
>
> Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Applied now to for-next branch. Thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-27 7:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-26 8:48 [PATCH] selftests/alsa:Fix printf format string in pcm-test.c Zhu Jun
2024-06-26 16:12 ` Mark Brown
2024-06-27 7:57 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox