Skip to contentSkip to conversation

ASoC: rt5663: fix sparse warnings

PATCH In review Wei Yongjun 4 participants 6 messages Sep 17, 2016 – Sep 21, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt5663: fix sparse warnings

From: Wei Yongjun <[email protected]>

Fixes the following sparse warnings:

sound/soc/codecs/rt5663.c:1367:14: warning: duplicate const sound/soc/codecs/rt5663.c:1577:5: warning:
symbol 'rt5663_button_detect' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:2857:24: warning:
symbol 'rt5663_aif_dai_ops' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:2866:27: warning:
symbol 'rt5663_dai' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:3193:6: warning:
symbol 'rt5663_i2c_shutdown' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:3200:19: warning:
symbol 'rt5663_i2c_driver' was not declared. Should it be static?

---
 sound/soc/codecs/rt5663.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/rt5663.c +6 -6
index 7963a27..fa79568 100644
@@ -1364,7 +1364,7 @@ static const char * const rt5663_if1_adc_data_select[] = {
 	"L/R", "R/L", "L/L", "R/R"
 };
 
-static const SOC_ENUM_SINGLE_DECL(rt5663_if1_adc_enum, RT5663_TDM_2,
+static SOC_ENUM_SINGLE_DECL(rt5663_if1_adc_enum, RT5663_TDM_2,
 	RT5663_DATA_SWAP_ADCDAT1_SHIFT, rt5663_if1_adc_data_select);
 
 static void rt5663_enable_push_button_irq(struct snd_soc_codec *codec,
@@ -1574,7 +1574,7 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
 	return rt5663->jack_type;
 }
 
-int rt5663_button_detect(struct snd_soc_codec *codec)
+static int rt5663_button_detect(struct snd_soc_codec *codec)
 {
 	int btn_type, val;
 
@@ -2854,7 +2854,7 @@ static int rt5663_resume(struct snd_soc_codec *codec)
 #define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
 
-struct snd_soc_dai_ops rt5663_aif_dai_ops = {
+static struct snd_soc_dai_ops rt5663_aif_dai_ops = {
 	.hw_params = rt5663_hw_params,
 	.set_fmt = rt5663_set_dai_fmt,
 	.set_sysclk = rt5663_set_dai_sysclk,
@@ -2863,7 +2863,7 @@ struct snd_soc_dai_ops rt5663_aif_dai_ops = {
 	.set_bclk_ratio = rt5663_set_bclk_ratio,
 };
 
-struct snd_soc_dai_driver rt5663_dai[] = {
+static struct snd_soc_dai_driver rt5663_dai[] = {
 	{
 		.name = "rt5663-aif",
 		.id = RT5663_AIF,
@@ -3190,14 +3190,14 @@ static int rt5663_i2c_remove(struct i2c_client *i2c)
 	return 0;
 }
 
-void rt5663_i2c_shutdown(struct i2c_client *client)
+static void rt5663_i2c_shutdown(struct i2c_client *client)
 {
 	struct rt5663_priv *rt5663 = i2c_get_clientdata(client);
 
 	regmap_write(rt5663->regmap, RT5663_RESET, 0);
 }
 
-struct i2c_driver rt5663_i2c_driver = {
+static struct i2c_driver rt5663_i2c_driver = {
 	.driver = {
 		.name = "rt5663",
 		.owner = THIS_MODULE,
#1 lore raw

[PATCH] ASoC: rt5663: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it.

sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it.

Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---

 rt5663.c |    1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/rt5663.c +0 -1
@@ -3200,7 +3200,6 @@ static void rt5663_i2c_shutdown(struct i
 static struct i2c_driver rt5663_i2c_driver = {
 	.driver = {
 		.name = "rt5663",
-		.owner = THIS_MODULE,
 		.acpi_match_table = ACPI_PTR(rt5663_acpi_match),
 		.of_match_table = of_match_ptr(rt5663_of_match),
 	},
Acked-by
#2 lore raw

RE: [PATCH] ASoC: rt5663: fix platform_no_drv_owner.cocci warnings

Quoted 12 lines

-----Original Message-----
From: kbuild test robot [mailto:[email protected]]
Sent: Saturday, September 17, 2016 10:45 AM
To: Wei Yongjun
Cc: [email protected]; Bard Liao; Oder Chiou; Liam Girdwood; Mark Brown; Jaroslav Kysela; Takashi Iwai; Wei Yongjun; [email protected]; [email protected]
Subject: [PATCH] ASoC: rt5663: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it.

Quoted 6 lines

Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

maintainer
#3 lore raw

Applied "ASoC: rt5663: fix platform_no_drv_owner.cocci warnings" to the asoc tree

In reply to kbuild test robot

The patch

ASoC: rt5663: fix platform_no_drv_owner.cocci warnings

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From c5f1edd405eb874cc2c81e8d62c6b3a73c502529 Mon Sep 17 00:00:00 2001

From: kbuild test robot <[email protected]>
Date: Sat, 17 Sep 2016 10:45:18 +0800
Subject: [PATCH] ASoC: rt5663: fix platform_no_drv_owner.cocci warnings

sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it.

Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

---
 sound/soc/codecs/rt5663.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/rt5663.c +0 -1
index 90a6ad5821f6..01a18d88f1eb 100644
@@ -3203,7 +3203,6 @@ static void rt5663_i2c_shutdown(struct i2c_client *client)
 static struct i2c_driver rt5663_i2c_driver = {
 	.driver = {
 		.name = "rt5663",
-		.owner = THIS_MODULE,
 		.acpi_match_table = ACPI_PTR(rt5663_acpi_match),
 		.of_match_table = of_match_ptr(rt5663_of_match),
 	},
Signature · 1 line
2.8.1
#4 lore raw
In reply to Wei Yongjun
url: https://github.com/0day-ci/linux/commits/Wei-Yongjun/ASoC-rt5663-fix-sparse-warnings/20160917-094530

Hi Wei,

[auto build test WARNING on next-20160916]

url: https://github.com/0day-ci/linux/commits/Wei-Yongjun/ASoC-rt5663-fix-sparse-warnings/20160917-094530

coccinelle warnings: (new ones prefixed by >>)

>> sound/soc/codecs/rt5663.c:3203:3-8: No need to set .owner here. The core will do it.

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

maintainer
#5 lore raw

Applied "ASoC: rt5663: fix sparse warnings" to the asoc tree

In reply to Wei Yongjun

The patch

ASoC: rt5663: fix sparse warnings

has been applied to the asoc tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 66d7c2629aa4f2c861b7cca9ff15b6bc38e9c9a8 Mon Sep 17 00:00:00 2001

From: Wei Yongjun <[email protected]>
Date: Sat, 17 Sep 2016 01:34:09 +0000
Subject: [PATCH] ASoC: rt5663: fix sparse warnings

Fixes the following sparse warnings:

sound/soc/codecs/rt5663.c:1367:14: warning: duplicate const sound/soc/codecs/rt5663.c:1577:5: warning:
symbol 'rt5663_button_detect' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:2857:24: warning:
symbol 'rt5663_aif_dai_ops' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:2866:27: warning:
symbol 'rt5663_dai' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:3193:6: warning:
symbol 'rt5663_i2c_shutdown' was not declared. Should it be static?
sound/soc/codecs/rt5663.c:3200:19: warning:
symbol 'rt5663_i2c_driver' was not declared. Should it be static?

---
 sound/soc/codecs/rt5663.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/rt5663.c +6 -6
index 8078abcaf728..90a6ad5821f6 100644
@@ -1364,7 +1364,7 @@ static const char * const rt5663_if1_adc_data_select[] = {
 	"L/R", "R/L", "L/L", "R/R"
 };
 
-static const SOC_ENUM_SINGLE_DECL(rt5663_if1_adc_enum, RT5663_TDM_2,
+static SOC_ENUM_SINGLE_DECL(rt5663_if1_adc_enum, RT5663_TDM_2,
 	RT5663_DATA_SWAP_ADCDAT1_SHIFT, rt5663_if1_adc_data_select);
 
 static void rt5663_enable_push_button_irq(struct snd_soc_codec *codec,
@@ -1574,7 +1574,7 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
 	return rt5663->jack_type;
 }
 
-int rt5663_button_detect(struct snd_soc_codec *codec)
+static int rt5663_button_detect(struct snd_soc_codec *codec)
 {
 	int btn_type, val;
 
@@ -2857,7 +2857,7 @@ static int rt5663_resume(struct snd_soc_codec *codec)
 #define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
 
-struct snd_soc_dai_ops rt5663_aif_dai_ops = {
+static struct snd_soc_dai_ops rt5663_aif_dai_ops = {
 	.hw_params = rt5663_hw_params,
 	.set_fmt = rt5663_set_dai_fmt,
 	.set_sysclk = rt5663_set_dai_sysclk,
@@ -2866,7 +2866,7 @@ struct snd_soc_dai_ops rt5663_aif_dai_ops = {
 	.set_bclk_ratio = rt5663_set_bclk_ratio,
 };
 
-struct snd_soc_dai_driver rt5663_dai[] = {
+static struct snd_soc_dai_driver rt5663_dai[] = {
 	{
 		.name = "rt5663-aif",
 		.id = RT5663_AIF,
@@ -3193,14 +3193,14 @@ static int rt5663_i2c_remove(struct i2c_client *i2c)
 	return 0;
 }
 
-void rt5663_i2c_shutdown(struct i2c_client *client)
+static void rt5663_i2c_shutdown(struct i2c_client *client)
 {
 	struct rt5663_priv *rt5663 = i2c_get_clientdata(client);
 
 	regmap_write(rt5663->regmap, RT5663_RESET, 0);
 }
 
-struct i2c_driver rt5663_i2c_driver = {
+static struct i2c_driver rt5663_i2c_driver = {
 	.driver = {
 		.name = "rt5663",
 		.owner = THIS_MODULE,
Signature · 1 line
2.8.1