[alsa-devel] [PATCH 0/5] ASoC: tegra: Some fixes in codec files
Compile tested using tegra_defconfig on the for-next branch of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
Sachin Kamat (5): ASoC: tegra_wm9712: Remove __devinitconst attribute ASoC: tegra20_ac97: Remove __devinitconst attribute ASoC: tegra: Make 'ahub_auxdata' static ASoC: tegra: Use NULL instead of 0 for pointers ASoC: tegra: Staticize some functions in tegra30_i2s.c
sound/soc/tegra/tegra20_ac97.c | 2 +- sound/soc/tegra/tegra30_ahub.c | 6 +++--- sound/soc/tegra/tegra30_i2s.c | 4 ++-- sound/soc/tegra/tegra_wm9712.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
This has been removed from the kernel recently and gives following build errors: sound/soc/tegra/tegra_wm9712.c:155:58: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__devinitconst’ sound/soc/tegra/tegra_wm9712.c:165:21: error: ‘tegra_wm9712_of_match’ undeclared here (not in a function)
Cc: Lucas Stach dev@lynxeye.de Signed-off-by: Sachin Kamat sachin.kamat@linaro.org --- sound/soc/tegra/tegra_wm9712.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index cdbd2f0..68d4240 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -152,7 +152,7 @@ static int tegra_wm9712_driver_remove(struct platform_device *pdev) return 0; }
-static const struct of_device_id tegra_wm9712_of_match[] __devinitconst = { +static const struct of_device_id tegra_wm9712_of_match[] = { { .compatible = "nvidia,tegra-audio-wm9712", }, {}, };
__devinitconst has been removed from the kernel and gives the following build errors: sound/soc/tegra/tegra20_ac97.c:460:58: error: Expected ; at end of declaration sound/soc/tegra/tegra20_ac97.c:460:58: error: got __devinitconst
Cc: Lucas Stach dev@lynxeye.de Signed-off-by: Sachin Kamat sachin.kamat@linaro.org --- sound/soc/tegra/tegra20_ac97.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index 1bae73b..336dcdd 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -457,7 +457,7 @@ static int tegra20_ac97_platform_remove(struct platform_device *pdev) return 0; }
-static const struct of_device_id tegra20_ac97_of_match[] __devinitconst = { +static const struct of_device_id tegra20_ac97_of_match[] = { { .compatible = "nvidia,tegra20-ac97", }, {}, };
Fixes the following sparse warning: sound/soc/tegra/tegra30_ahub.c:302:23: warning: symbol 'ahub_auxdata' was not declared. Should it be static?
Cc: Stephen Warren swarren@nvidia.com Signed-off-by: Sachin Kamat sachin.kamat@linaro.org --- sound/soc/tegra/tegra30_ahub.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index f354dc3..ad217cc 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c @@ -299,7 +299,7 @@ static const char * const configlink_clocks[] = { "spdif_in", };
-struct of_dev_auxdata ahub_auxdata[] = { +static struct of_dev_auxdata ahub_auxdata[] = { OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080300, "tegra30-i2s.0", NULL), OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080400, "tegra30-i2s.1", NULL), OF_DEV_AUXDATA("nvidia,tegra30-i2s", 0x70080500, "tegra30-i2s.2", NULL),
On 01/21/2013 02:29 AM, Sachin Kamat wrote:
Fixes the following sparse warning: sound/soc/tegra/tegra30_ahub.c:302:23: warning: symbol 'ahub_auxdata' was not declared. Should it be static?
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
-struct of_dev_auxdata ahub_auxdata[] = { +static struct of_dev_auxdata ahub_auxdata[] = {
This array is being removed from the driver for 3.9 in a patch being taken through the Tegra tree. As such, please drop this one patch.
The rest look fine to me, so the series, Reviewed-by: Stephen Warren swarren@nvidia.com
On 21 January 2013 22:46, Stephen Warren swarren@wwwdotorg.org wrote:
On 01/21/2013 02:29 AM, Sachin Kamat wrote:
Fixes the following sparse warning: sound/soc/tegra/tegra30_ahub.c:302:23: warning: symbol 'ahub_auxdata' was not declared. Should it be static?
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
-struct of_dev_auxdata ahub_auxdata[] = { +static struct of_dev_auxdata ahub_auxdata[] = {
This array is being removed from the driver for 3.9 in a patch being taken through the Tegra tree. As such, please drop this one patch.
OK.
The rest look fine to me, so the series, Reviewed-by: Stephen Warren swarren@nvidia.com
Thanks Stephen.
Mark, Do you want me to re-post this series after dropping this patch?
Fixes the following sparse warnings: sound/soc/tegra/tegra30_ahub.c:583:16: warning: Using plain integer as NULL pointer sound/soc/tegra/tegra30_ahub.c:600:16: warning: Using plain integer as NULL pointer
Cc: Stephen Warren swarren@nvidia.com Signed-off-by: Sachin Kamat sachin.kamat@linaro.org --- sound/soc/tegra/tegra30_ahub.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c index ad217cc..89c7423 100644 --- a/sound/soc/tegra/tegra30_ahub.c +++ b/sound/soc/tegra/tegra30_ahub.c @@ -580,7 +580,7 @@ err_clk_put_apbif: clk_put(ahub->clk_apbif); err_clk_put_d_audio: clk_put(ahub->clk_d_audio); - ahub = 0; + ahub = NULL; err: return ret; } @@ -597,7 +597,7 @@ static int tegra30_ahub_remove(struct platform_device *pdev) clk_put(ahub->clk_apbif); clk_put(ahub->clk_d_audio);
- ahub = 0; + ahub = NULL;
return 0; }
On 01/21/2013 02:29 AM, Sachin Kamat wrote:
Fixes the following sparse warnings: sound/soc/tegra/tegra30_ahub.c:583:16: warning: Using plain integer as NULL pointer sound/soc/tegra/tegra30_ahub.c:600:16: warning: Using plain integer as NULL pointer
Out of curiosity, which compiler is this with; I've never seen this warning.
On 21 January 2013 22:45, Stephen Warren swarren@wwwdotorg.org wrote:
On 01/21/2013 02:29 AM, Sachin Kamat wrote:
Fixes the following sparse warnings: sound/soc/tegra/tegra30_ahub.c:583:16: warning: Using plain integer as NULL pointer sound/soc/tegra/tegra30_ahub.c:600:16: warning: Using plain integer as NULL pointer
Out of curiosity, which compiler is this with; I've never seen this warning.
This is actually a sparse warning which you can see if you build the kernel with C=1 (or C=2) option as below:
make C=1 [targets] Check all c source with $CHECK (sparse by default) make C=2 [targets] Force check of all c source with $CHECK
'tegra30_i2s_startup' and 'tegra30_i2s_shutdown' are used only in this file and hence made static. Fixes the following sparse warnings: sound/soc/tegra/tegra30_i2s.c:74:5: warning: symbol 'tegra30_i2s_startup' was not declared. Should it be static? sound/soc/tegra/tegra30_i2s.c:101:6: warning: symbol 'tegra30_i2s_shutdown' was not declared. Should it be static?
Cc: Stephen Warren swarren@nvidia.com Signed-off-by: Sachin Kamat sachin.kamat@linaro.org --- sound/soc/tegra/tegra30_i2s.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c index 27e91dd..f4e1ce8 100644 --- a/sound/soc/tegra/tegra30_i2s.c +++ b/sound/soc/tegra/tegra30_i2s.c @@ -71,7 +71,7 @@ static int tegra30_i2s_runtime_resume(struct device *dev) return 0; }
-int tegra30_i2s_startup(struct snd_pcm_substream *substream, +static int tegra30_i2s_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); @@ -98,7 +98,7 @@ int tegra30_i2s_startup(struct snd_pcm_substream *substream, return ret; }
-void tegra30_i2s_shutdown(struct snd_pcm_substream *substream, +static void tegra30_i2s_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai);
participants (2)
-
Sachin Kamat
-
Stephen Warren