Re: [RFC v2 2/5] video: Add generic HDMI infoframe helpers

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

 



On Fri, Dec 07, 2012 at 12:32:42PM -0200, Paulo Zanoni wrote:
> 2012/12/5 Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx>:
[...]
> > +ssize_t hdmi_spd_infoframe_pack(struct hdmi_spd_infoframe *frame, void *buffer,
> > +                               size_t size)
> > +{
> > +       u8 *ptr = buffer;
> > +       size_t length, i;
> > +
> > +       if (!frame || !buffer)
> > +               return -EINVAL;
> > +
> > +       length = 4 + frame->length;
> > +
> > +       if (size < length)
> > +               return -ENOSPC;
> > +
> > +       memset(buffer, 0, length);
> > +
> > +       ptr[0] = frame->type;
> > +       ptr[1] = frame->version;
> > +       ptr[2] = frame->length;
> > +       ptr[3] = 0; /* checksum */
> > +
> > +       for (i = 0; i < sizeof(frame->vendor); i++)
> > +               ptr[4 + i] = frame->vendor[i];
> > +
> > +       for (i = 0; i < sizeof(frame->product); i++)
> > +               ptr[12 + i] = frame->product[i];
> > +
> > +       ptr[26] = frame->sdi;
> 
> Shouldn't this be ptr[28] ?

Yes, you're absolutely right.

By the way, I had to scroll through your reply several times before I
found this single line. If you remove unneeded context when replying
your comments are much easier to locate.

Thierry

Attachment: pgpdV2sYiMxXR.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux