Home
last modified time | relevance | path

Searched hist:"5338 c16905ed7e8145861e1dacdd4eadce18f2b9" (Results 1 – 3 of 3) sorted by relevance

/linux/drivers/media/usb/pvrusb2/
H A Dpvrusb2-encoder.cdiff 5338c16905ed7e8145861e1dacdd4eadce18f2b9 Tue Oct 23 20:57:09 CEST 2012 Ezequiel Garcia <elezegarcia@gmail.com> [media] pvrusb2: 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>
H A Dpvrusb2-i2c-core.cdiff 5338c16905ed7e8145861e1dacdd4eadce18f2b9 Tue Oct 23 20:57:09 CEST 2012 Ezequiel Garcia <elezegarcia@gmail.com> [media] pvrusb2: 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>
H A Dpvrusb2-v4l2.cdiff 5338c16905ed7e8145861e1dacdd4eadce18f2b9 Tue Oct 23 20:57:09 CEST 2012 Ezequiel Garcia <elezegarcia@gmail.com> [media] pvrusb2: 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>