On Jun 1, 2014, at 5:55 PM, BALATON Zoltan wrote:

/* Normalize bInterval to log2 of microframes */
+static int
+usb_decode_interval(const int speed, const endpoint_type type, const unsigned char bInterval)
+{
+#define LOG2(a) ((sizeof(unsigned) << 3) - __builtin_clz(a) - 1)
+ switch (speed) {
+ case LOW_SPEED:
+ switch (type) {
+ case ISOCHRONOUS: case INTERRUPT:

Could you place each case on its own separate line please.


+ switch (type) {
+ case ISOCHRONOUS: case INTERRUPT:


+ case SUPER_SPEED:
+ switch (type) {
+ case ISOCHRONOUS: case INTERRUPT:

These cases should be on their own separate lines also.