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

From: Harvey Harrison
Date: Fri Nov 14 2008 - 14:44:39 EST


On Fri, 2008-11-14 at 14:25 -0500, Devin Heitmueller wrote:
> > The alternative is to define the vendor ids as little-endian in the headers
> > then you don't need the endian swap in the switch or the case, but that would
> > require looking at the other uses first....or gently encourage more people to run sparse ;-)
> >
> > Harvey
>
> Harvey,
>
> If I may offer my opinion, this is not remotely performance-critical
> code. That said, I would favor on the side of
> maintainability/reliability in this case, and mkrufky's approach seems
> to be better on both accounts.

Well, I can see your point, and I don't even know what the chances are of
even finding this hardware on a big-endian machine are. But I'd suggest
that if you want to improve the maintainability of this code that someone
in v4l-land start running sparse regularly and work on getting some of these
_trivial_ parts annotated, then any new ones that get introduced will stick
out like sore thumbs.

But, not my driver, not my decision. Someone else can implement Michael's
suggestion if they want.

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/