]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: usb-audio: localize one-referrer variable
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 20 Feb 2017 20:09:17 +0000 (05:09 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 20 Feb 2017 20:45:37 +0000 (21:45 +0100)
When accessed by one referrer inner a file, variables should have static
qualifier to declare local-linkage.

This commit fixes the bug. Sparse generated below warnings.
sound/usb/mixer_us16x08.c:156:13: warning: duplicate const
sound/usb/mixer_us16x08.c:156:18: warning: symbol 'route_names' was not declared. Should it be static?

Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer_us16x08.c

index 301939b8f47215eca3e08aa5b497b75d57746c18..019336f53acfc4387e92ee762cdc997f60c26782 100644 (file)
@@ -153,7 +153,7 @@ static const char ratio_map[] = {
 };
 
 /* route enumeration names */
-const const char *route_names[] = {
+static const char *const route_names[] = {
        "Master Left", "Master Right", "Output 1", "Output 2", "Output 3",
        "Output 4", "Output 5", "Output 6", "Output 7", "Output 8",
 };