From: Takashi Iwai <tiwai@suse.de>
To: Malaya Kumar Rout <malayarout91@gmail.com>
Cc: linux-sound@vger.kernel.org, tiwai@suse.de, mrout@redhat.com,
skhan@linuxfoundation.org, me@brighamcampbell.com,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/alsa: Fix format specifier and function mismatch in mixer-test
Date: Mon, 06 Jul 2026 10:24:23 +0200 [thread overview]
Message-ID: <874iic5xvs.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260705171038.171966-1-malayarout91@gmail.com>
On Sun, 05 Jul 2026 19:10:38 +0200,
Malaya Kumar Rout wrote:
>
> In the ctl_value_index_valid() function, when validating 64-bit integer
> controls (SND_CTL_ELEM_TYPE_INTEGER64), the error message for maximum
> value validation has two bugs:
>
> 1. Uses snd_ctl_elem_info_get_max() instead of the 64-bit variant
> snd_ctl_elem_info_get_max64()
> 2. Uses %ld format specifier instead of %lld for long long type
>
> This is inconsistent with the minimum value validation (line 335-339)
> which correctly uses get_min64() and %lld. The mismatch can cause:
> - Incorrect maximum values being reported on some architectures
> - Undefined behavior due to format specifier mismatch
> - Potential crashes when printing the error message
>
> Fix by using snd_ctl_elem_info_get_max64() and %lld format specifier
> to match the data type and be consistent with the minimum value check.
>
> Signed-off-by: Malaya Kumar Rout <malayarout91@gmail.com>
Thanks, applied now.
Takashi
prev parent reply other threads:[~2026-07-06 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 17:10 [PATCH] selftests/alsa: Fix format specifier and function mismatch in mixer-test Malaya Kumar Rout
2026-07-06 8:24 ` Takashi Iwai [this message]
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=874iic5xvs.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=malayarout91@gmail.com \
--cc=me@brighamcampbell.com \
--cc=mrout@redhat.com \
--cc=perex@perex.cz \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tiwai@suse.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