linux_dsm_epyc7002/drivers/media/pci/cx18
Ezequiel Garcia 2e814af502 [media] cx18: 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: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27 19:02:24 -02:00
..
cx18-alsa-main.c [media] cx18: get rid of warning: no previous prototype 2012-10-27 17:58:14 -02:00
cx18-alsa-mixer.c
cx18-alsa-mixer.h
cx18-alsa-pcm.c [media] cx18: get rid of warning: no previous prototype 2012-10-27 17:58:14 -02:00
cx18-alsa-pcm.h
cx18-alsa.h
cx18-audio.c
cx18-audio.h
cx18-av-audio.c
cx18-av-core.c
cx18-av-core.h
cx18-av-firmware.c
cx18-av-vbi.c
cx18-cards.c
cx18-cards.h
cx18-controls.c
cx18-controls.h
cx18-driver.c
cx18-driver.h
cx18-dvb.c
cx18-dvb.h
cx18-fileops.c
cx18-fileops.h
cx18-firmware.c
cx18-firmware.h
cx18-gpio.c
cx18-gpio.h
cx18-i2c.c [media] cx18: Replace memcpy with struct assignment 2012-12-27 19:02:24 -02:00
cx18-i2c.h
cx18-io.c
cx18-io.h
cx18-ioctl.c
cx18-ioctl.h
cx18-irq.c
cx18-irq.h
cx18-mailbox.c
cx18-mailbox.h
cx18-queue.c
cx18-queue.h
cx18-scb.c
cx18-scb.h
cx18-streams.c [media] cx18: get rid of warning: no previous prototype 2012-10-27 17:58:14 -02:00
cx18-streams.h
cx18-vbi.c
cx18-vbi.h
cx18-version.h
cx18-video.c
cx18-video.h
cx23418.h
Kconfig
Makefile