* [PATCH] x86: intel_mid: replace memcpy with struct assignment
@ 2014-01-17 0:13 David Cohen
2014-01-17 0:18 ` [tip:x86/intel-mid] x86, intel_mid: Replace " tip-bot for Fengguang Wu
0 siblings, 1 reply; 2+ messages in thread
From: David Cohen @ 2014-01-17 0:13 UTC (permalink / raw)
To: hpa, mingo, tglx, x86; +Cc: linux-kernel, Fengguang Wu, David Cohen
From: Fengguang Wu <fengguang.wu@intel.com>
This is a cleanup proposed by coccinelle. It replaces memcpy with struct
assignment on intel-mid's sfi layer.
Generated by: coccinelle/misc/memcpy-assign.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
---
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 438306ebed05..994c40bd7cb7 100644
--- a/arch/x86/platform/intel-mid/sfi.c
+++ b/arch/x86/platform/intel-mid/sfi.c
@@ -250,7 +250,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;
}
@@ -271,7 +271,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.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/intel-mid] x86, intel_mid: Replace memcpy with struct assignment
2014-01-17 0:13 [PATCH] x86: intel_mid: replace memcpy with struct assignment David Cohen
@ 2014-01-17 0:18 ` tip-bot for Fengguang Wu
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Fengguang Wu @ 2014-01-17 0:18 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, david.a.cohen, tglx, hpa, fengguang.wu
Commit-ID: ee87c751d88f9b03fee7349556817fe80c113b32
Gitweb: http://git.kernel.org/tip/ee87c751d88f9b03fee7349556817fe80c113b32
Author: Fengguang Wu <fengguang.wu@intel.com>
AuthorDate: Thu, 16 Jan 2014 16:13:08 -0800
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Thu, 16 Jan 2014 16:11:10 -0800
x86, intel_mid: Replace memcpy with struct assignment
This is a cleanup proposed by coccinelle. It replaces memcpy with struct
assignment on intel-mid's sfi layer.
Generated by: coccinelle/misc/memcpy-assign.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Link: http://lkml.kernel.org/r/1389917588-9785-1-git-send-email-david.a.cohen@linux.intel.com
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
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 438306e..994c40b 100644
--- a/arch/x86/platform/intel-mid/sfi.c
+++ b/arch/x86/platform/intel-mid/sfi.c
@@ -250,7 +250,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;
}
@@ -271,7 +271,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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-17 0:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17 0:13 [PATCH] x86: intel_mid: replace memcpy with struct assignment David Cohen
2014-01-17 0:18 ` [tip:x86/intel-mid] x86, intel_mid: Replace " tip-bot for Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).