Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754250AbaBMKxk (ORCPT ); Thu, 13 Feb 2014 05:53:40 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:36781 "EHLO mail-pb0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753525AbaBMKxh (ORCPT ); Thu, 13 Feb 2014 05:53:37 -0500 From: Peng Tao To: Greg Kroah-Hartman Cc: Linux Kernel Mailing List , Fengguang Wu , Peng Tao , Andreas Dilger , Oleg Drokin Subject: [PATCH 3/3] staging/lustre: fix coccinelle warnings Date: Wed, 12 Feb 2014 19:21:40 +0800 Message-Id: <1392204100-968-3-git-send-email-bergwolf@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1392204100-968-2-git-send-email-bergwolf@gmail.com> References: <1392204100-968-1-git-send-email-bergwolf@gmail.com> <1392204100-968-2-git-send-email-bergwolf@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fengguang Wu 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 --- 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 -- 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/