Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1202419 > unrolled thread

[PATCH 30/31] sound/atom: use kmemdup rather than duplicating its implementation

Started byAndrzej Hajda <a.hajda@samsung.com>
First post2015-08-07 10:10 +0200
Last post2015-08-07 14:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 30/31] sound/atom: use kmemdup rather than duplicating its  implementation Andrzej Hajda <a.hajda@samsung.com> - 2015-08-07 10:10 +0200
    Re: [PATCH 30/31] sound/atom: use kmemdup rather than duplicating  its implementation Mark Brown <broonie@kernel.org> - 2015-08-07 14:30 +0200

#1202419 — [PATCH 30/31] sound/atom: use kmemdup rather than duplicating its implementation

FromAndrzej Hajda <a.hajda@samsung.com>
Date2015-08-07 10:10 +0200
Subject[PATCH 30/31] sound/atom: use kmemdup rather than duplicating its implementation
Message-ID<pUKT1-21E-47@gated-at.bofh.it>
The patch was generated using fixed coccinelle semantic patch
scripts/coccinelle/api/memdup.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2014320

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 sound/soc/intel/atom/sst/sst_ipc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/intel/atom/sst/sst_ipc.c b/sound/soc/intel/atom/sst/sst_ipc.c
index 5a27861..3dc7358 100644
--- a/sound/soc/intel/atom/sst/sst_ipc.c
+++ b/sound/soc/intel/atom/sst/sst_ipc.c
@@ -352,10 +352,9 @@ void sst_process_reply_mrfld(struct intel_sst_drv *sst_drv_ctx,
 	 * copy from mailbox
 	 **/
 	if (msg_high.part.large) {
-		data = kzalloc(msg_low, GFP_KERNEL);
+		data = kmemdup((void *)msg->mailbox_data, msg_low, GFP_KERNEL);
 		if (!data)
 			return;
-		memcpy(data, (void *) msg->mailbox_data, msg_low);
 		/* Copy command id so that we can use to put sst to reset */
 		dsp_hdr = (struct ipc_dsp_hdr *)data;
 		cmd_id = dsp_hdr->cmd_id;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1202645 — Re: [PATCH 30/31] sound/atom: use kmemdup rather than duplicating its implementation

FromMark Brown <broonie@kernel.org>
Date2015-08-07 14:30 +0200
SubjectRe: [PATCH 30/31] sound/atom: use kmemdup rather than duplicating its implementation
Message-ID<pUOWC-7Ms-9@gated-at.bofh.it>
In reply to#1202419

[Multipart message — attachments visible in raw view] — view raw

On Fri, Aug 07, 2015 at 09:59:36AM +0200, Andrzej Hajda wrote:
> The patch was generated using fixed coccinelle semantic patch
> scripts/coccinelle/api/memdup.cocci [1].
> 
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320
> 

Applied, but please make an effort to use subject lines reflecting the
style for the subsysetem and if you're sending a patch series make sure
that at least the cover letter goes to everyone or (if there are no
interdependencies as is the case here) just send them individually.
That way people can tell what's going on in terms of dependencies.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web