diff mbox

ASoC: Tegra: sparse cleanup

Message ID 1318632859-14796-1-git-send-email-olof@lixom.net
State Awaiting Upstream, archived
Headers show

Commit Message

Olof Johansson Oct. 14, 2011, 10:54 p.m. UTC
Fixes the following sparse warnings:

sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it be static?

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 sound/soc/tegra/tegra_das.c |    4 ++--
 sound/soc/tegra/tegra_pcm.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Stephen Warren Oct. 14, 2011, 10:59 p.m. UTC | #1
Olof Johansson wrote at Friday, October 14, 2011 4:54 PM:
> Fixes the following sparse warnings:
> 
> sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
> sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
> sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it
> be static?
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>

Acked-by: Stephen Warren <swarren@nvidia.com>

Grumble, in C++ 0==NULL... :-)
Olof Johansson Oct. 14, 2011, 11:01 p.m. UTC | #2
On Fri, Oct 14, 2011 at 3:59 PM, Stephen Warren <swarren@nvidia.com> wrote:
> Olof Johansson wrote at Friday, October 14, 2011 4:54 PM:
>> Fixes the following sparse warnings:
>>
>> sound/soc/tegra/tegra_das.c:215:8: warning: Using plain integer as NULL pointer
>> sound/soc/tegra/tegra_das.c:237:8: warning: Using plain integer as NULL pointer
>> sound/soc/tegra/tegra_pcm.c:370:32: warning: symbol 'tegra_pcm_platform' was not declared. Should it
>> be static?
>>
>> Signed-off-by: Olof Johansson <olof@lixom.net>
>
> Acked-by: Stephen Warren <swarren@nvidia.com>
>
> Grumble, in C++ 0==NULL... :-)

In C too, it's just sparse that is extra picky.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown Oct. 17, 2011, 9:43 p.m. UTC | #3
On Fri, Oct 14, 2011 at 03:54:19PM -0700, Olof Johansson wrote:
> Fixes the following sparse warnings:

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/sound/soc/tegra/tegra_das.c b/sound/soc/tegra/tegra_das.c
index 9f24ef7..3b55a44 100644
--- a/sound/soc/tegra/tegra_das.c
+++ b/sound/soc/tegra/tegra_das.c
@@ -212,7 +212,7 @@  err_release:
 	release_mem_region(res->start, resource_size(res));
 err_free:
 	kfree(das);
-	das = 0;
+	das = NULL;
 exit:
 	return ret;
 }
@@ -234,7 +234,7 @@  static int __devexit tegra_das_remove(struct platform_device *pdev)
 	release_mem_region(res->start, resource_size(res));
 
 	kfree(das);
-	das = 0;
+	das = NULL;
 
 	return 0;
 }
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
index c7cfd96..436def1 100644
--- a/sound/soc/tegra/tegra_pcm.c
+++ b/sound/soc/tegra/tegra_pcm.c
@@ -367,7 +367,7 @@  static void tegra_pcm_free(struct snd_pcm *pcm)
 	tegra_pcm_deallocate_dma_buffer(pcm, SNDRV_PCM_STREAM_PLAYBACK);
 }
 
-struct snd_soc_platform_driver tegra_pcm_platform = {
+static struct snd_soc_platform_driver tegra_pcm_platform = {
 	.ops		= &tegra_pcm_ops,
 	.pcm_new	= tegra_pcm_new,
 	.pcm_free	= tegra_pcm_free,