From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] ALSA: oxfw: make read-only const array models static
Date: Wed, 28 Jun 2023 08:36:04 +0900 [thread overview]
Message-ID: <20230627233604.GA278863@workstation.local> (raw)
In-Reply-To: <20230627113253.700065-1-colin.i.king@gmail.com>
Hi,
On Tue, Jun 27, 2023 at 12:32:53PM +0100, Colin Ian King wrote:
> Don't populate the const array on the stack, instead make it static.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
> sound/firewire/oxfw/oxfw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
> index 9523479fa94a..63d40f1a914f 100644
> --- a/sound/firewire/oxfw/oxfw.c
> +++ b/sound/firewire/oxfw/oxfw.c
> @@ -44,7 +44,7 @@ struct compat_info {
>
> static bool detect_loud_models(struct fw_unit *unit)
> {
> - const char *const models[] = {
> + static const char *const models[] = {
> "Onyxi",
> "Onyx-i",
> "Onyx 1640i",
> --
> 2.39.2
Indeed. It is preferable.
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
I found that ALSA fireface driver includes the similar issue. I'll send a
patch to fix it later.
Thanks
Takashi Sakamoto
next prev parent reply other threads:[~2023-06-27 23:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 11:32 [PATCH][next] ALSA: oxfw: make read-only const array models static Colin Ian King
2023-06-27 23:36 ` Takashi Sakamoto [this message]
2023-06-28 9:42 ` 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=20230627233604.GA278863@workstation.local \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--cc=colin.i.king@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox