projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
28c6a39
)
x86, intel_mid: Replace memcpy with struct assignment
author
Fengguang Wu
<fengguang.wu@intel.com>
Fri, 17 Jan 2014 00:13:08 +0000
(16:13 -0800)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Fri, 17 Jan 2014 00:11:10 +0000
(16:11 -0800)
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
patch
|
blob
|
history
diff --git
a/arch/x86/platform/intel-mid/sfi.c
b/arch/x86/platform/intel-mid/sfi.c
index 438306ebed0529f5a258876be4ef371242935dd3..994c40bd7cb7c8cc54dc4f9fec2be2ea7f74a4af 100644
(file)
--- 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;