Re: [PATCH v3] usbutils: convert to libusb-1.0

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

 



On Thursday, November 18, 2010 18:03:45 Mike Frysinger wrote:
> On Thursday, November 18, 2010 17:04:38 Greg KH wrote:
> > On Thu, Nov 18, 2010 at 04:08:26PM -0500, Mike Frysinger wrote:
> > > -#if (__BYTE_ORDER == __LITTLE_ENDIAN)
> > > -  #define le16_to_cpu(x) (x)
> > > -#elif (__BYTE_ORDER == __BIG_ENDIAN)
> > > -  #define le16_to_cpu(x) bswap_16(x)
> > > -#else
> > > -  #error missing BYTE_ORDER
> > > -#endif
> > > +#define le16_to_cpu(x) libusb_cpu_to_le16(libusb_cpu_to_le16(x))
> > 
> > This line causes warnings when building.  And are you sure it's right?
> > Is that how libusb wants to be used?  Why not just use the
> > libusb_le16_to_cpu() macro instead?
> 
> it isnt causing warings for me ... what warnings are you seeing ?
> 
> it's doubled up because because it seems like the code wants to turn "le16
> to cpu" but libusb is doing "cpu to le16".  but looking at the usage of
> this macro, perhaps i'm reading too much into the name.
> 
> i'll try and find a big endian machine with usable USB ...

i dont have any atm :(
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux