mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][next] ASoC: tas2781: make const read-only array magic_number static
@ 2023-10-17 17:04 Colin Ian King
  2023-10-17 23:41 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2023-10-17 17:04 UTC (permalink / raw)
  To: Shenghao Ding, Kevin Lu, Baojun Xu, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, alsa-devel
  Cc: kernel-janitors, linux-kernel

Don't populate the const read-only array magic_number on the stack,
instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 sound/soc/codecs/tas2781-fmwlib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/tas2781-fmwlib.c b/sound/soc/codecs/tas2781-fmwlib.c
index e27775d834e9..4efe95b60aaa 100644
--- a/sound/soc/codecs/tas2781-fmwlib.c
+++ b/sound/soc/codecs/tas2781-fmwlib.c
@@ -1757,7 +1757,7 @@ static int fw_parse_header(struct tasdevice_priv *tas_priv,
 {
 	struct tasdevice_dspfw_hdr *fw_hdr = &(tas_fmw->fw_hdr);
 	struct tasdevice_fw_fixed_hdr *fw_fixed_hdr = &(fw_hdr->fixed_hdr);
-	const unsigned char magic_number[] = { 0x35, 0x35, 0x35, 0x32 };
+	static const unsigned char magic_number[] = { 0x35, 0x35, 0x35, 0x32 };
 	const unsigned char *buf = (unsigned char *)fmw->data;
 
 	if (offset + 92 > fmw->size) {
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][next] ASoC: tas2781: make const read-only array magic_number static
  2023-10-17 17:04 [PATCH][next] ASoC: tas2781: make const read-only array magic_number static Colin Ian King
@ 2023-10-17 23:41 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-10-17 23:41 UTC (permalink / raw)
  To: Shenghao Ding, Kevin Lu, Baojun Xu, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, alsa-devel, Colin Ian King
  Cc: kernel-janitors, linux-kernel

On Tue, 17 Oct 2023 18:04:36 +0100, Colin Ian King wrote:
> Don't populate the const read-only array magic_number on the stack,
> instead make it static const.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: tas2781: make const read-only array magic_number static
      commit: 9a4bf1f0be01582806e85322d18bf5c9f21d0b40

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-17 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 17:04 [PATCH][next] ASoC: tas2781: make const read-only array magic_number static Colin Ian King
2023-10-17 23:41 ` Mark Brown

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®