lkml.org 
[lkml]   [2023]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH][next] ASoC: tas2781: make const read-only array magic_number static
Date
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
\
 
 \ /
  Last update: 2023-10-17 19:05    [W:4.129 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site