linux_dsm_epyc7002/drivers/media/usb/hdpvr
Ezequiel Garcia d486b94b26 [media] hdpvr: 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:46:08 -02:00
..
hdpvr-control.c
hdpvr-core.c [media] drivers/media/usb/hdpvr/hdpvr-core.c: fix error return code 2012-11-22 14:22:31 -02:00
hdpvr-i2c.c [media] hdpvr: Replace memcpy with struct assignment 2012-12-27 18:46:08 -02:00
hdpvr-video.c [media] v4l2: make vidioc_s_audio const 2012-09-26 10:50:12 -03:00
hdpvr.h
Kconfig
Makefile [media] move i2c files into drivers/media/i2c 2012-08-15 16:42:14 -03:00