From: Peng Tao <bergwolf@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Fengguang Wu <fengguang.wu@intel.com>,
Peng Tao <bergwolf@gmail.com>,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Subject: [PATCH 3/3] staging/lustre: fix coccinelle warnings
Date: Wed, 12 Feb 2014 19:21:40 +0800 [thread overview]
Message-ID: <1392204100-968-3-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1392204100-968-2-git-send-email-bergwolf@gmail.com>
From: Fengguang Wu <fengguang.wu@intel.com>
drivers/staging/lustre/lustre/llite/dir.c:1416:2-8: Replace memcpy with struct assignment
Generated by: coccinelle/misc/memcpy-assign.cocci
CC: Peng Tao <bergwolf@gmail.com>
CC: Andreas Dilger <andreas.dilger@intel.com>
CC: Oleg Drokin <oleg.drokin@intel.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
drivers/staging/lustre/lustre/llite/dir.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 78ee3b1..fd0dd20e 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -1400,7 +1400,7 @@ lmv_out_free:
if (tmp == NULL)
GOTO(free_lmv, rc = -ENOMEM);
- memcpy(tmp, &lum, sizeof(lum));
+ *tmp = lum;
tmp->lum_type = LMV_STRIPE_TYPE;
tmp->lum_stripe_count = 1;
mdtindex = ll_get_mdt_idx(inode);
--
1.7.7.6
prev parent reply other threads:[~2014-02-13 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 11:21 [PATCH 1/3] staging/lustre/libcfs: remove user space code from kernel_user_comm.c Peng Tao
2014-02-12 11:21 ` [PATCH 2/3] staging/lustre/libcfs: remove cfs_hash_long Peng Tao
2014-02-12 11:21 ` Peng Tao [this message]
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=1392204100-968-3-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.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