[Sound-open-firmware] [PATCH] audio: fix some memcpy argument
From: Pan Xiuli xiuli.pan@linux.intel.com
memcpy argument need void * pointer.
Contributor: Luo Xionghu xionghu.luo@intel.com Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com --- Test with: Mininow max rt5651 SOF master: 0505823b9667036202758ea950c3ff3347359730 SOF-Tool master: 8c9ebfe9c4f8037b0d0816dedcb87dabef347c6b https://github.com/plbossart/sound/tree/topic/sof-v4.14: 5a91e6776d41b0e97828882294cdc00b5c0bafd6 --- src/audio/dai.c | 2 +- src/audio/eq_fir.c | 2 +- src/audio/eq_iir.c | 2 +- src/audio/host.c | 2 +- src/audio/mixer.c | 2 +- src/audio/src.c | 2 +- src/audio/tone.c | 2 +- src/audio/volume.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/audio/dai.c b/src/audio/dai.c index d19e18a..4015b84 100644 --- a/src/audio/dai.c +++ b/src/audio/dai.c @@ -190,7 +190,7 @@ static struct comp_dev *dai_new(struct sof_ipc_comp *comp) return NULL;
dai = (struct sof_ipc_comp_dai *)&dev->comp; - memcpy(dai, ipc_dai, sizeof(struct sof_ipc_comp_dai)); + memcpy((void *)dai, ipc_dai, sizeof(struct sof_ipc_comp_dai));
dd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*dd)); if (dd == NULL) { diff --git a/src/audio/eq_fir.c b/src/audio/eq_fir.c index 2dfa11c..9628d13 100644 --- a/src/audio/eq_fir.c +++ b/src/audio/eq_fir.c @@ -260,7 +260,7 @@ static struct comp_dev *eq_fir_new(struct sof_ipc_comp *comp) return NULL;
eq_fir = (struct sof_ipc_comp_eq_fir *) &dev->comp; - memcpy(eq_fir, ipc_eq_fir, sizeof(struct sof_ipc_comp_eq_fir)); + memcpy((void *)eq_fir, ipc_eq_fir, sizeof(struct sof_ipc_comp_eq_fir));
cd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*cd)); if (cd == NULL) { diff --git a/src/audio/eq_iir.c b/src/audio/eq_iir.c index eb464af..3742e7a 100644 --- a/src/audio/eq_iir.c +++ b/src/audio/eq_iir.c @@ -261,7 +261,7 @@ static struct comp_dev *eq_iir_new(struct sof_ipc_comp *comp) if (dev == NULL) return NULL;
- memcpy(&dev->comp, comp, sizeof(struct sof_ipc_comp_eq_iir)); + memcpy((void *)&dev->comp, comp, sizeof(struct sof_ipc_comp_eq_iir));
cd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*cd)); if (cd == NULL) { diff --git a/src/audio/host.c b/src/audio/host.c index b3c3c83..30b2d8c 100644 --- a/src/audio/host.c +++ b/src/audio/host.c @@ -242,7 +242,7 @@ static struct comp_dev *host_new(struct sof_ipc_comp *comp) return NULL;
host = (struct sof_ipc_comp_host *)&dev->comp; - memcpy(host, ipc_host, sizeof(struct sof_ipc_comp_host)); + memcpy((void *)host, ipc_host, sizeof(struct sof_ipc_comp_host));
hd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*hd)); if (hd == NULL) { diff --git a/src/audio/mixer.c b/src/audio/mixer.c index e3611d4..26e94d8 100644 --- a/src/audio/mixer.c +++ b/src/audio/mixer.c @@ -93,7 +93,7 @@ static struct comp_dev *mixer_new(struct sof_ipc_comp *comp) return NULL;
mixer = (struct sof_ipc_comp_mixer *)&dev->comp; - memcpy(mixer, ipc_mixer, sizeof(struct sof_ipc_comp_mixer)); + memcpy((void *)mixer, ipc_mixer, sizeof(struct sof_ipc_comp_mixer));
md = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*md)); if (md == NULL) { diff --git a/src/audio/src.c b/src/audio/src.c index d494d96..55fa2f8 100644 --- a/src/audio/src.c +++ b/src/audio/src.c @@ -280,7 +280,7 @@ static struct comp_dev *src_new(struct sof_ipc_comp *comp) return NULL;
src = (struct sof_ipc_comp_src *) &dev->comp; - memcpy(src, ipc_src, sizeof(struct sof_ipc_comp_src)); + memcpy((void *)src, ipc_src, sizeof(struct sof_ipc_comp_src));
cd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*cd)); if (cd == NULL) { diff --git a/src/audio/tone.c b/src/audio/tone.c index 581f87e..da8af5e 100644 --- a/src/audio/tone.c +++ b/src/audio/tone.c @@ -411,7 +411,7 @@ static struct comp_dev *tone_new(struct sof_ipc_comp *comp) return NULL;
tone = (struct sof_ipc_comp_tone *) &dev->comp; - memcpy(tone, ipc_tone, sizeof(struct sof_ipc_comp_tone)); + memcpy((void *)tone, ipc_tone, sizeof(struct sof_ipc_comp_tone));
cd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*cd)); if (cd == NULL) { diff --git a/src/audio/volume.c b/src/audio/volume.c index 3b3e2aa..f289226 100644 --- a/src/audio/volume.c +++ b/src/audio/volume.c @@ -370,7 +370,7 @@ static struct comp_dev *volume_new(struct sof_ipc_comp *comp) return NULL;
vol = (struct sof_ipc_comp_volume *)&dev->comp; - memcpy(vol, ipc_vol, sizeof(struct sof_ipc_comp_volume)); + memcpy((void *)vol, ipc_vol, sizeof(struct sof_ipc_comp_volume));
cd = rzalloc(RZONE_RUNTIME, RFLAGS_NONE, sizeof(*cd)); if (cd == NULL) {
participants (1)
-
Xiuli Pan