[alsa-devel] [PATCH 4/4] ASoC: intel: atom: localize variable without external linkage

Takashi Sakamoto o-takashi at sakamocchi.jp
Tue May 2 15:33:03 CEST 2017


A driver for Intel SST driver for old atom platform includes a variable
which has no external linkage. These functions should have static
qualifier.

This commit adds the qualifier to localize the variable. This issue is
detected by sparse:

sst.c:261:1: warning: symbol 'dev_attr_firmware_version' was not declared. Should it be static?

Cc: Sebastien Guiriec <sebastien.guiriec at intel.com>
Cc: Vinod Koul <vinod.koul at intel.com>
Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
---
 sound/soc/intel/atom/sst/sst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
index f9ba713..d97556a 100644
--- a/sound/soc/intel/atom/sst/sst.c
+++ b/sound/soc/intel/atom/sst/sst.c
@@ -258,7 +258,7 @@ static ssize_t firmware_version_show(struct device *dev,
 
 }
 
-DEVICE_ATTR_RO(firmware_version);
+static DEVICE_ATTR_RO(firmware_version);
 
 static const struct attribute *sst_fw_version_attrs[] = {
 	&dev_attr_firmware_version.attr,
-- 
2.9.3



More information about the Alsa-devel mailing list