2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00
linux-next/drivers/media/usb/sn9c102
Ezequiel Garcia 5869bb39f8 [media] sn9c102: Replace memcpy with struct assignment
This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27 18:44:46 -02:00
..
Kconfig
Makefile
sn9c102_config.h
sn9c102_core.c [media] sn9c102: Replace memcpy with struct assignment 2012-12-27 18:44:46 -02:00
sn9c102_devtable.h
sn9c102_hv7131d.c
sn9c102_hv7131r.c
sn9c102_mi0343.c
sn9c102_mi0360.c
sn9c102_mt9v111.c
sn9c102_ov7630.c
sn9c102_ov7660.c
sn9c102_pas106b.c
sn9c102_pas202bcb.c
sn9c102_sensor.h
sn9c102_tas5110c1b.c
sn9c102_tas5110d.c
sn9c102_tas5130d1b.c
sn9c102.h