From: Thomas Meyer <thomas@m3y3r.de>
To: ohad@wizery.com, linux-kernel@vger.kernel.org
Subject: [PATCH] remoteproc: Cocci spatch "memdup.spatch"
Date: Sat, 01 Jun 2013 11:39:14 +0200 [thread overview]
Message-ID: <1370079554.29224.6.camel@localhost.localdomain> (raw)
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -913,11 +913,10 @@ static void rproc_fw_config_virtio(const
* will be stored in the cached_table. Before the device is started,
* cached_table will be copied into devic memory.
*/
- rproc->cached_table = kmalloc(tablesz, GFP_KERNEL);
+ rproc->cached_table = kmemdup(table, tablesz, GFP_KERNEL);
if (!rproc->cached_table)
goto out;
- memcpy(rproc->cached_table, table, tablesz);
rproc->table_ptr = rproc->cached_table;
/* count the number of notify-ids */
next reply other threads:[~2013-06-01 9:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 9:39 Thomas Meyer [this message]
2013-07-01 14:25 ` Ohad Ben-Cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370079554.29224.6.camel@localhost.localdomain \
--to=thomas@m3y3r.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ohad@wizery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®