From: Fengguang Wu Date: Wed, 12 Feb 2014 11:21:40 +0000 (+0800) Subject: staging/lustre: fix coccinelle warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7f46528c9d7d3e136b99fdee99134f894b0336c6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging/lustre: fix coccinelle warnings 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 CC: Andreas Dilger CC: Oleg Drokin CC: Greg Kroah-Hartman Signed-off-by: Fengguang Wu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 78ee3b118787..fd0dd20e1170 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);