]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: renesas: Fix non-static global variable
authorsongxiebing <songxiebing@kylinos.cn>
Wed, 25 Mar 2026 02:28:04 +0000 (10:28 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 26 Mar 2026 13:06:02 +0000 (13:06 +0000)
When using global variables in a .c file only,it is necessary to add
the keyword "static", so here fix the warning.

sparse warnings: (new ones prefixed by >>)
>> sound/soc/renesas/dma-sh7760.c:62:3: sparse: sparse: symbol
'cam_pcm_data' was not declared. Should it be static?

Signed-off-by: songxiebing <songxiebing@kylinos.cn>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412171210.7a4vH3Ew-lkp@intel.com/
Link: https://patch.msgid.link/20260325022804.253353-1-songxiebing@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/renesas/dma-sh7760.c

index ca128ea903dae55012a9becea133cee5bed3660d..810f44cd6523e33b2cae6460dd3aab44d8640353 100644 (file)
@@ -58,8 +58,9 @@ struct camelot_pcm {
        struct snd_pcm_substream *rx_ss;
        unsigned long rx_period_size;
        unsigned int  rx_period;
+};
 
-} cam_pcm_data[2] = {
+static struct camelot_pcm cam_pcm_data[2] = {
        {
                .mmio   =       0xFE3C0040,
                .txid   =       DMABRGIRQ_A0TXF,