lkml.org 
[lkml]   [2008]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [v4l-dvb-maintainer] [PATCH] dvb: usb vendor_ids/product_ids are __le16
From
Date
On Fri, 2008-11-14 at 14:05 -0500, Michael Krufky wrote:
> Wouldn't it be nicer to just switch on
> cpu_to_le16(udev->descriptor.idVendor) ? This would be a 1-line change,
> compile to a smaller footprint, and be easier to read.
>
> Personally, I prefer to try to avoid duplicating code in places where a
> single operation may occur centrally.

On a little-endian arch it makes no difference obviously, but on a
big-endian arch it's the difference between compile-time and runtime
byteswapping.

Harvey



\
 
 \ /
  Last update: 2008-11-14 20:11    [W:0.051 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site