* [PATCH v1] ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot
@ 2025-05-13 7:17 Shenghao Ding
2025-05-13 9:02 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Shenghao Ding @ 2025-05-13 7:17 UTC (permalink / raw)
To: tiwai
Cc: broonie, andriy.shevchenko, 13564923607, 13916275206, alsa-devel,
linux-kernel, baojun.xu, Baojun.Xu, jesse-ji, Shenghao Ding,
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>
---
v1:
- | 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$
---
sound/pci/hda/tas2781_hda_spi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c
index 50b82ecabb90..e0f8603c4854 100644
--- a/sound/pci/hda/tas2781_hda_spi.c
+++ b/sound/pci/hda/tas2781_hda_spi.c
@@ -493,7 +493,7 @@ static int tas2781_force_fwload_put(struct snd_kcontrol *kcontrol,
return change;
}
-struct snd_kcontrol_new tas2781_snd_ctls[] = {
+static struct snd_kcontrol_new tas2781_snd_ctls[] = {
ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_AMP_LEVEL, 1, 0, 20, 0,
tas2781_amp_getvol, tas2781_amp_putvol, amp_vol_tlv),
ACARD_SINGLE_RANGE_EXT_TLV(NULL, TAS2781_DVC_LVL, 0, 0, 200, 1,
@@ -502,14 +502,14 @@ struct snd_kcontrol_new tas2781_snd_ctls[] = {
tas2781_force_fwload_put),
};
-struct snd_kcontrol_new tas2781_prof_ctl = {
+static struct snd_kcontrol_new tas2781_prof_ctl = {
.iface = SNDRV_CTL_ELEM_IFACE_CARD,
.info = tasdevice_info_profile,
.get = tasdevice_get_profile_id,
.put = tasdevice_set_profile_id,
};
-struct snd_kcontrol_new tas2781_dsp_ctls[] = {
+static struct snd_kcontrol_new tas2781_dsp_ctls[] = {
/* Speaker Program */
{
.iface = SNDRV_CTL_ELEM_IFACE_CARD,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot
2025-05-13 7:17 [PATCH v1] ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot Shenghao Ding
@ 2025-05-13 9:02 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-05-13 9:02 UTC (permalink / raw)
To: Shenghao Ding
Cc: broonie, andriy.shevchenko, 13564923607, 13916275206, alsa-devel,
linux-kernel, baojun.xu, Baojun.Xu, jesse-ji, kernel test robot
On Tue, 13 May 2025 09:17:21 +0200,
Shenghao Ding wrote:
>
> 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>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-15 8:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 7:17 [PATCH v1] ALSA: hda/tas2781: Fix the symbol was not declare warning reported by kernel test robot Shenghao Ding
2025-05-13 9:02 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.