[OpenBIOS] [PATCH v2] Add USB OHCI + HID driver

BALATON Zoltan balaton at eik.bme.hu
Fri Jun 6 21:34:48 CEST 2014


On Fri, 6 Jun 2014, Programmingkid wrote:
> 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.

These are in original code from coreboot. I did not change anything in 
that apart from those lines that needed porting and fixing for endianness 
so that it can be diffed to the original and any fixes can be easily taken 
from coreboot in the future. Reformatting code to match style could be 
done but it would make it more difficult to keep the two versions in sync. 
Please decide if you really want that.

Regards,
BALATON Zoltan



More information about the OpenBIOS mailing list