Re: [PATCH 0/23] media: Replace memcpy with struct assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-11-28 at 16:06 -0300, Ezequiel Garcia wrote:
> On Tue, Oct 23, 2012 at 4:57 PM, Ezequiel Garcia <elezegarcia@xxxxxxxxx> wrote:
> > This is a large patchset that replaces struct memcpy with struct assignment,
> > whenever possible at drivers/media.
[]
> > 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>
[]
> > Comments, feedback and flames are welcome. Thanks!
[]
> Given we're very near merge window, I'm wondering if you're
> considering picking this series.

I think you should verify that sizeof is any of
sizeof(struct struct_name) or sizeof(*to) or sizeof(*from)
and highlight any entries that aren't.


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux