From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Ivan Orlov <ivan.orlov0322@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ALSA: kunit: make read-only array buf_samples static const
Date: Fri, 26 Apr 2024 08:22:50 +0900 [thread overview]
Message-ID: <20240425232250.GA205425@workstation.local> (raw)
In-Reply-To: <20240425160754.114716-1-colin.i.king@gmail.com>
Hi,
On Thu, Apr 25, 2024 at 05:07:54PM +0100, Colin Ian King wrote:
> Don't populate the read-only array buf_samples on the stack at
> run time, instead make it static const.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> sound/core/sound_kunit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/core/sound_kunit.c b/sound/core/sound_kunit.c
> index eb90f62228c0..e34c4317f5eb 100644
> --- a/sound/core/sound_kunit.c
> +++ b/sound/core/sound_kunit.c
> @@ -167,7 +167,7 @@ static void _test_fill_silence(struct kunit *test, struct snd_format_test_data *
>
> static void test_format_fill_silence(struct kunit *test)
> {
> - u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES };
> + static const u32 buf_samples[] = { 10, 20, 32, 64, 129, SILENCE_BUFFER_MAX_FRAMES };
> u8 *buffer;
> u32 i, j;
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
We can see the other similar cases in the kunit file. I'll post the fix
later.
Thanks
Takashi Sakamoto
next prev parent reply other threads:[~2024-04-25 23:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 16:07 [PATCH][next] ALSA: kunit: make read-only array buf_samples static const Colin Ian King
2024-04-25 23:22 ` Takashi Sakamoto [this message]
2024-04-26 12:05 ` Ivan Orlov
2024-04-26 15:08 ` Takashi Iwai
2024-04-26 23:22 ` Ivan Orlov
2024-04-26 10:23 ` Ivan Orlov
2024-04-26 15:07 ` 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=20240425232250.GA205425@workstation.local \
--to=o-takashi@sakamocchi.jp \
--cc=colin.i.king@gmail.com \
--cc=ivan.orlov0322@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.