All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: tiwai@suse.de, broonie@kernel.org
Cc: alsa-devel@alsa-project.org, Andy Green <andy.green@linaro.org>,
	John Stultz <john.stultz@linaro.org>
Subject: [PATCH 3/4] ASoC: hisilicon: localize functions without external linkage
Date: Tue,  2 May 2017 22:33:02 +0900	[thread overview]
Message-ID: <20170502133303.19622-4-o-takashi@sakamocchi.jp> (raw)
In-Reply-To: <20170502133303.19622-1-o-takashi@sakamocchi.jp>

A driver for hi6210 sound interface on hi6220 boards includes some
functions which has no external linkage. These functions should have
static qualifier.

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

hi6210-i2s.c:100:5: warning: symbol 'hi6210_i2s_startup' was not declared. Should it be static?
hi6210-i2s.c:178:6: warning: symbol 'hi6210_i2s_shutdown' was not declared. Should it be static?
hi6210-i2s.c:527:27: warning: symbol 'hi6210_i2s_dai_init' was not declared. Should it be static?

Cc: John Stultz <john.stultz@linaro.org>
Cc: Andy Green <andy.green@linaro.org>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/soc/hisilicon/hi6210-i2s.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/hisilicon/hi6210-i2s.c b/sound/soc/hisilicon/hi6210-i2s.c
index 45163e5..b193d3b 100644
--- a/sound/soc/hisilicon/hi6210-i2s.c
+++ b/sound/soc/hisilicon/hi6210-i2s.c
@@ -97,8 +97,8 @@ static inline u32 hi6210_read_reg(struct hi6210_i2s *i2s, int reg)
 	return readl(i2s->base + reg);
 }
 
-int hi6210_i2s_startup(struct snd_pcm_substream *substream,
-		     struct snd_soc_dai *cpu_dai)
+static int hi6210_i2s_startup(struct snd_pcm_substream *substream,
+			      struct snd_soc_dai *cpu_dai)
 {
 	struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev);
 	int ret, n;
@@ -175,8 +175,9 @@ int hi6210_i2s_startup(struct snd_pcm_substream *substream,
 
 	return 0;
 }
-void hi6210_i2s_shutdown(struct snd_pcm_substream *substream,
-		       struct snd_soc_dai *cpu_dai)
+
+static void hi6210_i2s_shutdown(struct snd_pcm_substream *substream,
+				struct snd_soc_dai *cpu_dai)
 {
 	struct hi6210_i2s *i2s = dev_get_drvdata(cpu_dai->dev);
 	int n;
@@ -524,7 +525,7 @@ static struct snd_soc_dai_ops hi6210_i2s_dai_ops = {
 	.shutdown	= hi6210_i2s_shutdown,
 };
 
-struct snd_soc_dai_driver hi6210_i2s_dai_init = {
+static const struct snd_soc_dai_driver hi6210_i2s_dai_init = {
 	.probe		= hi6210_i2s_dai_probe,
 	.playback = {
 		.channels_min = 2,
-- 
2.9.3

  parent reply	other threads:[~2017-05-02 13:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 13:32 [PATCH 0/4] ALSA/ASoC: fix after merging ASoC PR for v4.12-rc1 Takashi Sakamoto
2017-05-02 13:33 ` [PATCH 1/4] ASoC: codecs: da7213: fix invalid usage of bitwise operation in loop condition Takashi Sakamoto
2017-05-02 14:02   ` Adam Thomson
2017-05-02 13:33 ` [PATCH 2/4] ASoC: codecs: msm8916: fix invalid cast to bool type Takashi Sakamoto
2017-05-14  9:59   ` Mark Brown
2017-05-15  8:14     ` Takashi Iwai
2017-05-15  8:17       ` Mark Brown
2017-05-15  8:17         ` Mark Brown
2017-05-15  8:43         ` Takashi Iwai
2017-05-15  8:02   ` Applied "ASoC: codecs: msm8916: fix invalid cast to bool type" to the asoc tree Mark Brown
2017-05-02 13:33 ` Takashi Sakamoto [this message]
2017-05-15  8:02   ` Applied "ASoC: hisilicon: localize functions without external linkage" " Mark Brown
2017-05-02 13:33 ` [PATCH 4/4] ASoC: intel: atom: localize variable without external linkage Takashi Sakamoto
2017-05-15  8:02   ` Applied "ASoC: intel: atom: localize variable without external linkage" to the asoc tree Mark Brown

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=20170502133303.19622-4-o-takashi@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy.green@linaro.org \
    --cc=broonie@kernel.org \
    --cc=john.stultz@linaro.org \
    --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.