Re: [PATCH] Video/UVC: Fix unaligned exceptions in uvc video driver.

From: Laurent Pinchart
Date: Tue Nov 11 2008 - 12:11:36 EST


On Monday 10 November 2008, Hennerich, Michael wrote:
> > -----Original Message-----
> > From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxx]
> > Sent: Sunday, November 09, 2008 1:55 PM
> > To: Bryan Wu
> > Cc: linux-uvc-devel@xxxxxxxxxxxxxxxx; video4linux-list@xxxxxxxxxx;
> > linux-kernel@xxxxxxxxxxxxxxx; Michael Hennerich
> > Subject: Re: [PATCH] Video/UVC: Fix unaligned exceptions in uvc video
> > driver.
> >
> > Hi Bryan, Michael,
> >
> > Thanks for the patch.
> >
> > On Thursday 06 November 2008, Bryan Wu wrote:
> > > From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
> > >
> > > buffer can be odd aligned on some NOMMU machine such as Blackfin
> >
> > The comment is a bit misleading. Buffers can be odd-aligned independently
> > off the machine type. The issue comes from machines that can't access
> > unaligned memory. Something like "Fix access to unaligned memory" would be
> > better.
[snip]

> > What about using get_unaligned_le16 and get_unaligned_le32 directly ?
> > Lines would be shorter and could be kept behind the 80 columns limit more
> > easily.
> > Tell me if you want to resubmit or if I should make the modification
> > myself (including the patch description).
>
> Laurent,
>
> Well - I just used the same style already used in various other places
> in the uvc driver. - Just wanted to be consistent.

No worries. get_unaligned_le{16|32} has been introduced in the kernel recently
and I haven't updated the uvcvideo driver like I should have. I'll fix that.

> If you don't mind doing the changes (including the patch description),
> please go ahead.

Ok I'll fix and submit the patch.

Best regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/