ASoC: Intel: Baytrail: Fix implicit declaration of function 'memcpy_fromio'
diff mbox

Message ID 1393420341-31625-1-git-send-email-jarkko.nikula@linux.intel.com
State New, archived
Headers show

Commit Message

Jarkko Nikula Feb. 26, 2014, 1:12 p.m. UTC
Some kernel configurations can cause following build error:

sound/soc/intel/sst-baytrail-ipc.c: In function ‘sst_byt_get_dsp_position’:
sound/soc/intel/sst-baytrail-ipc.c:744:2: error: implicit declaration of function ‘memcpy_fromio’ [-Werror=implicit-function-declaration]
  memcpy_fromio(&fw_tstamp,
  ^
cc1: some warnings being treated as errors

Fix this by including <asm/io.h> explicitly.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
Also sst-dsp., sst-baytrail-dsp.c and sst-haswell-dsp.c are using
memcpy_fromio/_toio but there <asm/io.h> seems to come via
<linux/dma-mapping.h> or <linux/io.h> so I didn't touch them.
---
 sound/soc/intel/sst-baytrail-ipc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Takashi Iwai Feb. 26, 2014, 1:18 p.m. UTC | #1
At Wed, 26 Feb 2014 15:12:21 +0200,
Jarkko Nikula wrote:
> 
> Some kernel configurations can cause following build error:
> 
> sound/soc/intel/sst-baytrail-ipc.c: In function ‘sst_byt_get_dsp_position’:
> sound/soc/intel/sst-baytrail-ipc.c:744:2: error: implicit declaration of function ‘memcpy_fromio’ [-Werror=implicit-function-declaration]
>   memcpy_fromio(&fw_tstamp,
>   ^
> cc1: some warnings being treated as errors
> 
> Fix this by including <asm/io.h> explicitly.

linux/io.h should be included instead, as checkpatch.pl would
suggest.


Takashi

> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> Also sst-dsp., sst-baytrail-dsp.c and sst-haswell-dsp.c are using
> memcpy_fromio/_toio but there <asm/io.h> seems to come via
> <linux/dma-mapping.h> or <linux/io.h> so I didn't touch them.
> ---
>  sound/soc/intel/sst-baytrail-ipc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/sound/soc/intel/sst-baytrail-ipc.c b/sound/soc/intel/sst-baytrail-ipc.c
> index 8c91a68b90bc..8b067e34094e 100644
> --- a/sound/soc/intel/sst-baytrail-ipc.c
> +++ b/sound/soc/intel/sst-baytrail-ipc.c
> @@ -27,6 +27,7 @@
>  #include <linux/kthread.h>
>  #include <linux/firmware.h>
>  #include <asm/div64.h>
> +#include <asm/io.h>
>  
>  #include "sst-baytrail-ipc.h"
>  #include "sst-dsp.h"
> -- 
> 1.8.5.3
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Patch
diff mbox

diff --git a/sound/soc/intel/sst-baytrail-ipc.c b/sound/soc/intel/sst-baytrail-ipc.c
index 8c91a68b90bc..8b067e34094e 100644
--- a/sound/soc/intel/sst-baytrail-ipc.c
+++ b/sound/soc/intel/sst-baytrail-ipc.c
@@ -27,6 +27,7 @@ 
 #include <linux/kthread.h>
 #include <linux/firmware.h>
 #include <asm/div64.h>
+#include <asm/io.h>
 
 #include "sst-baytrail-ipc.h"
 #include "sst-dsp.h"