All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: onkel@paraair.de, tiwai@suse.de
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 1/5] ALSA: usb-audio: localize one-referrer variable
Date: Tue, 21 Feb 2017 05:09:17 +0900	[thread overview]
Message-ID: <20170220200921.824-2-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20170220200921.824-1-o-takashi@sakamocchi.jp>

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>
---
 sound/usb/mixer_us16x08.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/mixer_us16x08.c b/sound/usb/mixer_us16x08.c
index 301939b..019336f 100644
--- a/sound/usb/mixer_us16x08.c
+++ b/sound/usb/mixer_us16x08.c
@@ -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",
 };
-- 
2.9.3

  reply	other threads:[~2017-02-20 20:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 20:09 [PATCH 0/5] ALSA: usb-audio: fixes for quirks of Tascam US-16x08 Takashi Sakamoto
2017-02-20 20:09 ` Takashi Sakamoto [this message]
2017-02-20 20:51   ` [PATCH 1/5] ALSA: usb-audio: localize one-referrer variable Takashi Iwai
2017-02-20 20:09 ` [PATCH 2/5] ALSA: usb-audio: purge needless variable length array Takashi Sakamoto
2017-02-20 20:51   ` Takashi Iwai
2017-02-20 21:04     ` Takashi Iwai
2017-02-21  2:23       ` Takashi Sakamoto
2017-02-20 20:09 ` [PATCH 3/5] ALSA: usb-audio: localize function without external linkage Takashi Sakamoto
2017-02-20 20:52   ` Takashi Iwai
2017-02-20 20:09 ` [PATCH 4/5] ALSA: usb-audio: deallocate memory objects in error path Takashi Sakamoto
2017-02-20 20:49   ` Takashi Iwai
2017-02-21  2:32     ` Takashi Sakamoto
2017-02-21 22:45       ` Takashi Sakamoto
2017-02-21 22:59         ` Takashi Sakamoto
2017-02-22  1:42           ` Takashi Sakamoto
2017-02-22  7:44             ` Takashi Iwai
2017-02-22  7:46               ` Takashi Iwai
2017-02-22 13:37                 ` Takashi Sakamoto
2017-02-22 14:05                   ` Takashi Iwai
2017-02-22 13:20               ` Takashi Sakamoto
2017-02-20 20:09 ` [PATCH 5/5] ALSA: usb-audio: fix msleep timeout due to minimum resolution of task scheduling Takashi Sakamoto
2017-02-20 20:51   ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170220200921.824-2-o-takashi@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=onkel@paraair.de \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.