diff mbox

[PATCHv2] ASoC: Intel: Fix sparse warnings for firmware loader.

Message ID 1392818784-6248-1-git-send-email-liam.r.girdwood@linux.intel.com (mailing list archive)
State Accepted
Commit 7bcd84878ebd87168682b117e1cb9dd8a55a1a8b
Headers show

Commit Message

Liam Girdwood Feb. 19, 2014, 2:06 p.m. UTC
Changes since V1 :-
 o Fixed sparse warning for block_module_remove
 o Fixed additional sparse warnings when building entire driver. 

Sparse gives us the following warnings on sst-firmware.c

  CHECK   sound/soc/intel/sst-firmware.c
sound/soc/intel/sst-firmware.c:39:34: warning: incorrect type in argument 1 (different address spaces)
sound/soc/intel/sst-firmware.c:39:34:    expected void volatile [noderef] <asn:2>*dst
sound/soc/intel/sst-firmware.c:39:34:    got void *
sound/soc/intel/sst-firmware.c:417:36: warning: incorrect type in argument 1 (different address spaces)
sound/soc/intel/sst-firmware.c:417:36:    expected void *dest
sound/soc/intel/sst-firmware.c:417:36:    got void [noderef] <asn:2>*
sound/soc/intel/sst-firmware.c:430:5: warning: symbol 'sst_block_module_remove' was not declared. Should it be static?

and

  CC [M]  sound/soc/intel/sst-dsp.o
sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces)
sound/soc/intel/sst-dsp-priv.h:271:53:    expected void *src
sound/soc/intel/sst-dsp-priv.h:271:53:    got void [noderef] <asn:2>*
sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces)
sound/soc/intel/sst-dsp-priv.h:271:53:    expected void *src
sound/soc/intel/sst-dsp-priv.h:271:53:    got void [noderef] <asn:2>*
sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces)
sound/soc/intel/sst-dsp-priv.h:271:53:    expected void *src
sound/soc/intel/sst-dsp-priv.h:271:53:    got void [noderef] <asn:2>*


This patch removes these warnings

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 sound/soc/intel/sst-dsp-priv.h | 7 +++++--
 sound/soc/intel/sst-firmware.c | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

Comments

Mark Brown Feb. 19, 2014, 3:09 p.m. UTC | #1
On Wed, Feb 19, 2014 at 02:06:23PM +0000, Liam Girdwood wrote:

Applied, thanks.

> Changes since V1 :-
>  o Fixed sparse warning for block_module_remove
>  o Fixed additional sparse warnings when building entire driver. 

Don't put stuff like this in the changelog, if you want to include it
put it after the ---.  Nobody is going to care when they look at the git
log since v1 won't be there.
diff mbox

Patch

diff --git a/sound/soc/intel/sst-dsp-priv.h b/sound/soc/intel/sst-dsp-priv.h
index 6135564..fe8e81a 100644
--- a/sound/soc/intel/sst-dsp-priv.h
+++ b/sound/soc/intel/sst-dsp-priv.h
@@ -41,8 +41,10 @@  struct sst_ops {
 	u64 (*read64)(void __iomem *addr, u32 offset);
 
 	/* DSP I/DRAM IO */
-	void (*ram_read)(struct sst_dsp *sst, void *dest, void *src, size_t bytes);
-	void (*ram_write)(struct sst_dsp *sst, void *dest, void *src, size_t bytes);
+	void (*ram_read)(struct sst_dsp *sst, void  *dest, void __iomem *src,
+		size_t bytes);
+	void (*ram_write)(struct sst_dsp *sst, void __iomem *dest, void *src,
+		size_t bytes);
 
 	void (*dump)(struct sst_dsp *);
 
@@ -296,6 +298,7 @@  struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id);
 struct sst_module *sst_mem_block_alloc_scratch(struct sst_dsp *dsp);
 void sst_mem_block_free_scratch(struct sst_dsp *dsp,
 	struct sst_module *scratch);
+int sst_block_module_remove(struct sst_module *module);
 
 /* Register the DSPs memory blocks - would be nice to read from ACPI */
 struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset,
diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c
index 31cd154..dee7eb5 100644
--- a/sound/soc/intel/sst-firmware.c
+++ b/sound/soc/intel/sst-firmware.c
@@ -30,7 +30,7 @@ 
 #include "sst-dsp.h"
 #include "sst-dsp-priv.h"
 
-static void sst_memcpy32(void *dest, void *src, u32 bytes)
+static void sst_memcpy32(volatile void __iomem *dest, void *src, u32 bytes)
 {
 	u32 i;