Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763011Ab3JQVxY (ORCPT ); Thu, 17 Oct 2013 17:53:24 -0400 Received: from mga09.intel.com ([134.134.136.24]:35575 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762934Ab3JQVwK (ORCPT ); Thu, 17 Oct 2013 17:52:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,517,1378882800"; d="scan'208";a="394625567" From: David Cohen To: x86@kernel.org, hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de Cc: linux-kernel@vger.kernel.org, Fengguang Wu , Kuppuswamy Sathyanarayanan , "H. Peter Anvin" , David Cohen Subject: [PATCH v9 11/14] intel_mid: fix coccinelle warnings Date: Thu, 17 Oct 2013 14:55:54 -0700 Message-Id: <1382046957-15987-12-git-send-email-david.a.cohen@linux.intel.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1382046957-15987-1-git-send-email-david.a.cohen@linux.intel.com> References: <1382046957-15987-1-git-send-email-david.a.cohen@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 45 From: Fengguang Wu arch/x86/platform/intel-mid/sfi.c:272:1-7: Replace memcpy with struct assignment /c/kernel-tests/src/i386/arch/x86/platform/intel-mid/sfi.c:251:1-7: Replace memcpy with struct assignment Generated by: coccinelle/misc/memcpy-assign.cocci CC: Kuppuswamy Sathyanarayanan CC: H. Peter Anvin CC: David Cohen Signed-off-by: Fengguang Wu --- arch/x86/platform/intel-mid/sfi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/platform/intel-mid/sfi.c b/arch/x86/platform/intel-mid/sfi.c index 2f8196d..0cf574b 100644 --- a/arch/x86/platform/intel-mid/sfi.c +++ b/arch/x86/platform/intel-mid/sfi.c @@ -248,7 +248,7 @@ static void __init intel_scu_spi_device_register(struct spi_board_info *sdev) sdev->modalias); return; } - memcpy(new_dev, sdev, sizeof(*sdev)); + *new_dev = *sdev; spi_devs[spi_next_dev++] = new_dev; } @@ -269,7 +269,7 @@ static void __init intel_scu_i2c_device_register(int bus, idev->type); return; } - memcpy(new_dev, idev, sizeof(*idev)); + *new_dev = *idev; i2c_bus[i2c_next_dev] = bus; i2c_devs[i2c_next_dev++] = new_dev; -- 1.8.4.rc3 -- 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/