[PATCH 1/2] ASoC: codecs: nau8360: Fix static declarations and endianness
From: Neo Chang
Date: Wed Sep 02 2026 - 23:40:51 EST
Fix warnings reported by the kernel test robot:
1. Make the 'nau8360_dsp_addr' array static to resolve namespace pollution.
2. Change the variable type to '__be16' to fix the incorrect type.
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202609021121.a4mHPAyZ-lkp@xxxxxxxxx/
Signed-off-by: Neo Chang <YLCHANG2@xxxxxxxxxxx>
---
sound/soc/codecs/nau8360-dsp.c | 2 +-
sound/soc/codecs/nau8360.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/nau8360-dsp.c b/sound/soc/codecs/nau8360-dsp.c
index 2d6bc2962229..41afccbea2c0 100644
--- a/sound/soc/codecs/nau8360-dsp.c
+++ b/sound/soc/codecs/nau8360-dsp.c
@@ -20,7 +20,7 @@
#include "nau8360.h"
#define NAU8360_DSP_IDLE_RETRY 10
-const unsigned short nau8360_dsp_addr[NAU8360_DSP_FW_NUM] = {
+static const unsigned short nau8360_dsp_addr[NAU8360_DSP_FW_NUM] = {
NAU8360_RF000_DSP_COMM, NAU8360_RF002_DSP_COMM };
static int nau8360_dsp_chan_kcs_setup(struct snd_soc_component *cp,
diff --git a/sound/soc/codecs/nau8360.c b/sound/soc/codecs/nau8360.c
index d7af2dffb749..802806d92fc4 100644
--- a/sound/soc/codecs/nau8360.c
+++ b/sound/soc/codecs/nau8360.c
@@ -409,7 +409,7 @@ static int nau8360_peq_coeff_get(struct snd_kcontrol *kcontrol,
struct nau8360 *nau8360 = snd_soc_component_get_drvdata(cp);
struct soc_bytes_ext *params = (void *)kcontrol->private_value;
int i, value, reg, ret = 0;
- u16 *val = (u16 *)ucontrol->value.bytes.data;
+ __be16 *val = (__be16 *)ucontrol->value.bytes.data;
/* Use the DAPM lock to prevent race conditions during DAPM power-up
* state transitions, and check component active status to prohibit
--
2.25.1