Skip to contentSkip to conversation

sound/usb/mixer_scarlett_gen2.c:2000:5: sparse: sparse: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

PATCH kernel test robot 3 participants 6 messages May 22, 2021 – May 23, 2021 Sound

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-linus
head:   9ebaef0540a981093bce5df15af32354d32391d9
commit: 265d1a90e4fb6d3264d8122fbd10760e5e733be6 [117/119] ALSA: usb-audio: scarlett2: Improve driver startup messages
config: x86_64-randconfig-s021-20210522 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?id=265d1a90e4fb6d3264d8122fbd10760e5e733be6
        git remote add sound https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
        git fetch --no-tags sound for-linus
        git checkout 265d1a90e4fb6d3264d8122fbd10760e5e733be6
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate

sparse warnings: (new ones prefixed by >>)

>> sound/usb/mixer_scarlett_gen2.c:2000:5: sparse: sparse: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

author build bot
#1 lore raw

[RFC PATCH sound] ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static

sound/usb/mixer_scarlett_gen2.c:2000:5: warning: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

sound/usb/mixer_scarlett_gen2.c:2000:5: warning: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

Fixes 265d1a90e4fb ("ALSA: usb-audio: scarlett2: Improve driver startup messages")
---
 mixer_scarlett_gen2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/usb/mixer_scarlett_gen2.c +2 -2
index 3ad8f61a2095f..4caf379d5b991 100644
@@ -1997,8 +1997,8 @@ static int scarlett2_mixer_status_create(struct usb_mixer_interface *mixer)
 	return usb_submit_urb(mixer->urb, GFP_KERNEL);
 }
 
-int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer,
-				      const struct scarlett2_device_info *info)
+static int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer,
+					     const struct scarlett2_device_info *info)
 {
 	int err;
 
#2 lore raw

Re: [RFC PATCH sound] ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static

Quoted 6 lines · kernel test robot

sound/usb/mixer_scarlett_gen2.c:2000:5: warning: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

Fixes 265d1a90e4fb ("ALSA: usb-audio: scarlett2: Improve driver startup messages")

Applied now. Thanks.

Takashi

#3 lore raw

Re: [RFC PATCH sound] ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static

In reply to kernel test robot

Hi Takashi,

This patch seems legitimate to me (although I would adjust whitespace so the second line doesn't go over 80 chars). Do you want to just apply it as-is, or do you want me to send a second version of my patch without this problem or send a new patch similar to this one?

Also sorry I don't know what the etiquette is in cc's for this message :(. The message from kernel test robot was sent to a lot of people who I don't think would be interested in this, so I trimmed the cc list down.

Thanks,
Geoffrey.

Quoted 24 lines · kernel test robot

sound/usb/mixer_scarlett_gen2.c:2000:5: warning: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

Fixes 265d1a90e4fb ("ALSA: usb-audio: scarlett2: Improve driver startup messages")
---
 mixer_scarlett_gen2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/usb/mixer_scarlett_gen2.c +2 -2
index 3ad8f61a2095f..4caf379d5b991 100644
@@ -1997,8 +1997,8 @@ static int scarlett2_mixer_status_create(struct usb_mixer_interface *mixer)
 	return usb_submit_urb(mixer->urb, GFP_KERNEL);
 }
 
-int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer,
-				      const struct scarlett2_device_info *info)
+static int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer,
+					     const struct scarlett2_device_info *info)
 {
 	int err;
 
#4 lore raw

Re: [RFC PATCH sound] ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static

Quoted 7 lines · Geoffrey D. Bennett

Hi Takashi,

This patch seems legitimate to me (although I would adjust whitespace so the second line doesn't go over 80 chars). Do you want to just apply it as-is, or do you want me to send a second version of my patch without this problem or send a new patch similar to this one?

As it's an obviously correct patch, I already applied as is.

thanks,

Takashi

Quoted 35 lines

Also sorry I don't know what the etiquette is in cc's for this message :(. The message from kernel test robot was sent to a lot of people who I don't think would be interested in this, so I trimmed the cc list down.

Thanks,
Geoffrey.

Quoted 24 lines · kernel test robot

sound/usb/mixer_scarlett_gen2.c:2000:5: warning: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static?

Fixes 265d1a90e4fb ("ALSA: usb-audio: scarlett2: Improve driver startup messages")
---
 mixer_scarlett_gen2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/usb/mixer_scarlett_gen2.c +2 -2
index 3ad8f61a2095f..4caf379d5b991 100644
@@ -1997,8 +1997,8 @@ static int scarlett2_mixer_status_create(struct usb_mixer_interface *mixer)
 	return usb_submit_urb(mixer->urb, GFP_KERNEL);
 }
 
-int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer,
-				      const struct scarlett2_device_info *info)
+static int snd_scarlett_gen2_controls_create(struct usb_mixer_interface *mixer,
+					     const struct scarlett2_device_info *info)
 {
 	int err;
 
#5 lore raw

Re: [RFC PATCH sound] ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static

Quoted 11 lines · Takashi Iwai
Quoted 7 lines · Geoffrey D. Bennett

Hi Takashi,

This patch seems legitimate to me (although I would adjust whitespace so the second line doesn't go over 80 chars). Do you want to just apply it as-is, or do you want me to send a second version of my patch without this problem or send a new patch similar to this one?

As it's an obviously correct patch, I already applied as is.

Thank you!