Google
  Web www.spinics.net

Re: [PATCH] dvb: usb vendor_ids/product_ids are __le16

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


On Fri, Nov 14, 2008 at 2:07 PM, Harvey Harrison
<harvey.harrison@xxxxxxxxx> wrote:
> 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.
>

Its not my driver, but I think that doing the operation on the switch
is prettier than doing it on each case statement.  Also, it would
avoid future bugs, if somebody decides to add new cases to the switch
block.

-Mike

_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [Linux USB]

-->
Add to Google Powered by Linux

Google PageRank Checking tool