On Wed, Feb 22, 2017 at 08:27:37AM +1100, Tobin C. Harding wrote: > Comedi drivers make heavy use of standard types i.e unsigned > short. According to Linux Device Drivers standard C data types are not > the same size of all architectures. > > Should we be converting comedi/drivers to use kernel types u8, u16 etc > > Follow up question. Some comedi/drivers also use unsigned long for > variables that are not memory addresses. If we are to convert standard > types to kernel types how does one know the intended size of these > variables. Since comedi was written in 1999/2002 I guess we can safely assume unsigned long was intended to be 32 bits. And considering that unsigned char, short, and int are use in the same file. > I see that the register values come from the manual > > http://www.ni.com/pdf/manuals/340934b.pdf > > Is the choice (size) of type in a struct (eg struct ni_private, > comedi/drivers/ni_stc.h) a kernel design issue or is it a hardware > issue and should I be reading the manual to find it. > > thanks, > Tobin. > _______________________________________________ > devel mailing list > devel@xxxxxxxxxxxxxxxxxxxxxx > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel -- Tobin Harding http://tobin.cc _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel