[PATCH -next] ALSA: ac97: set variables dev_attr_vendor_id to static
sparse reports sound/ac97/bus.c:465:1: sparse: sparse: symbol 'dev_attr_vendor_id' was not declared. Should it be static?
This variable is only used in its defining file, so it should be static.
Reported-by: kernel test robot lkp@intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202307242300.Oy0Dp2QI-lkp@intel.com/ Signed-off-by: Yu Liao liaoyu15@huawei.com --- sound/ac97/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 6067c04ce4c0..3173e9d98927 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -462,7 +462,7 @@ static ssize_t vendor_id_show(struct device *dev,
return sysfs_emit(buf, "%08x", codec->vendor_id); } -DEVICE_ATTR_RO(vendor_id); +static DEVICE_ATTR_RO(vendor_id);
static struct attribute *ac97_dev_attrs[] = { &dev_attr_vendor_id.attr,
On Wed, 02 Aug 2023 04:26:49 +0200, Yu Liao wrote:
sparse reports sound/ac97/bus.c:465:1: sparse: sparse: symbol 'dev_attr_vendor_id' was not declared. Should it be static?
This variable is only used in its defining file, so it should be static.
Reported-by: kernel test robot lkp@intel.com Closes: https://lore.kernel.org/oe-kbuild-all/202307242300.Oy0Dp2QI-lkp@intel.com/ Signed-off-by: Yu Liao liaoyu15@huawei.com
Thanks, applied now.
Takashi
participants (1)
-
Takashi Iwai
-
Yu Liao