On Tue, Apr 30, 2019 at 12:19 AM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > ... not that there's much sense keeping ->fieldbus_type in host-endian, > while we are at it. Interesting! Suppose we make device->fieldbus_type bus-endian. Then the endinan-ness conversion either needs to happen in bus_match() (and we'd have to convert endianness each time this function is called). Or, we make driver->fieldbus_type bus-endian also, then there is no need for conversion... but the driver writer has to remember to specify this in bus endianness: static struct anybuss_client_driver profinet_driver = { .probe = ..., .fieldbus_type = endian convert?? (0x0089), }; Which pushes bus implementation details onto the client driver writer? Also, how to convert a constant to a specific endianness in a static initializer? You never make a remark without good reason, so what am I overlooking? _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel