Re: [v4l-dvb-maintainer] [PATCH] dvb: usb vendor_ids/product_idsare __le16

From: Harvey Harrison
Date: Fri Nov 14 2008 - 14:08:01 EST


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

--
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/