From: Mark Brown <broonie@kernel.org>
To: "Nikola Z. Ivanov" <zlatistiv@gmail.com>
Cc: perex@perex.cz, tiwai@suse.com, shuah@kernel.org,
linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] selftests/alsa: remove 0/NULL global variable assignment
Date: Thu, 21 Aug 2025 21:49:29 +0100 [thread overview]
Message-ID: <9c310ab7-0f0b-412f-8df7-71730a2d2caa@sirena.org.uk> (raw)
In-Reply-To: <20250821200132.1218850-1-zlatistiv@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
On Thu, Aug 21, 2025 at 11:01:32PM +0300, Nikola Z. Ivanov wrote:
> Remove 0/NULL global variable assignment in mixer-test.c and pcm-test.c
Why?
> --- a/tools/testing/selftests/alsa/mixer-test.c
> +++ b/tools/testing/selftests/alsa/mixer-test.c
> @@ -53,10 +53,10 @@ struct ctl_data {
> struct ctl_data *next;
> };
>
> -int num_cards = 0;
> -int num_controls = 0;
> -struct card_data *card_list = NULL;
> -struct ctl_data *ctl_list = NULL;
> +int num_cards;
> +int num_controls;
> +struct card_data *card_list;
> +struct ctl_data *ctl_list;
Nothing now sets initial values for these variables so they all have
undefined values which is buggy. The code is relying on the default
values.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2025-08-21 20:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 20:01 Nikola Z. Ivanov
2025-08-21 20:49 ` Mark Brown [this message]
2025-08-21 21:17 ` Nikola Ivanov
2025-08-21 21:30 ` Mark Brown
2025-08-21 22:57 ` Nikola Z. Ivanov
2025-08-21 23:14 ` Mark Brown
2025-08-22 6:21 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c310ab7-0f0b-412f-8df7-71730a2d2caa@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shuah@kernel.org \
--cc=tiwai@suse.com \
--cc=zlatistiv@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®