lkml.org 
[lkml]   [2011]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] media: fix truncated entity specification
Date
Hi Clemens,

On Tuesday 15 November 2011 14:02:21 Clemens Ladisch wrote:
> Laurent Pinchart wrote:
> > On Saturday 05 November 2011 22:42:01 Clemens Ladisch wrote:
> > > When enumerating an entity, assign the entire entity specification
> > > instead of only the first two words. (This requires giving the
> > > specification union a name.)
> >
> > What about this (untested) simpler patch ?
> >
> > - u_ent.v4l.major = ent->v4l.major;
> > - u_ent.v4l.minor = ent->v4l.minor;
> > + memcpy(&u_ent.raw, &ent->raw, sizeof(u_ent.raw));
>
> I would have written it this way if ent->raw actually existed.
> (And please don't tell me you want to increase the size of
> struct media_entity by 172 bytes. :)

Oops, my bad :-)

Your patch looks good then, except that I would memcpy to u_ent.raw instead of
u_ent.v4l. Would you also be ok with shortening specification to spec (or
info) ?

--
Regards,

Laurent Pinchart


\
 
 \ /
  Last update: 2011-11-16 01:35    [W:0.178 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site