Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot

After commit 28a09d9e42c5 ("ALSA: hda/tas2781: Create an independent lib
to save the shared parts for both SPI and I2C driver") created a separated
lib for both hda-i2c and hda-spi driver, which caused this issue.
sparse warnings: (new ones prefixed by >>)
>> sound/pci/hda/tas2781_hda_spi.c:496:25: sparse: sparse: symbol
'tas2781_snd_ctls' was not declared. Should it be static?
>> sound/pci/hda/tas2781_hda_spi.c:505:25: sparse: sparse: symbol
'tas2781_prof_ctl' was not declared. Should it be static?
>> sound/pci/hda/tas2781_hda_spi.c:512:25: sparse: sparse: symbol
'tas2781_dsp_ctls' was not declared. Should it be static?

Fixes: 28a09d9e42c5 ("ALSA: hda/tas2781: Create an independent lib to save the shared parts for both SPI and I2C driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/202505130420.vr9yDI3k-lkp@intel.com/__;!!G3vK!URphGMMfZ2erCLfJdETofl0O1mTSydDLLJ6inMIYWYUDUKYef_IuLvI7pnYj3Mx-4LRIi4BJEw$
Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250513071721.1090-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Shenghao Ding and committed by
Takashi Iwai
6f174dae e088806c

+3 -3
+3 -3
sound/pci/hda/tas2781_hda_spi.c
··· 493 493 return change; 494 494 } 495 495 496 - struct snd_kcontrol_new tas2781_snd_ctls[] = { 496 + static struct snd_kcontrol_new tas2781_snd_ctls[] = { 497 497 ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_AMP_LEVEL, 1, 0, 20, 0, 498 498 tas2781_amp_getvol, tas2781_amp_putvol, amp_vol_tlv), 499 499 ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_DVC_LVL, 0, 0, 200, 1, ··· 502 502 tas2781_force_fwload_put), 503 503 }; 504 504 505 - struct snd_kcontrol_new tas2781_prof_ctl = { 505 + static struct snd_kcontrol_new tas2781_prof_ctl = { 506 506 .iface = SNDRV_CTL_ELEM_IFACE_CARD, 507 507 .info = tasdevice_info_profile, 508 508 .get = tasdevice_get_profile_id, 509 509 .put = tasdevice_set_profile_id, 510 510 }; 511 511 512 - struct snd_kcontrol_new tas2781_dsp_ctls[] = { 512 + static struct snd_kcontrol_new tas2781_dsp_ctls[] = { 513 513 /* Speaker Program */ 514 514 { 515 515 .iface = SNDRV_CTL_ELEM_IFACE_CARD,