Re: [Resend PATCH V4 1/4] USB: Set usb port's DeviceRemovable according acpi information in EHCI

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

 



On 2012年11月15日 04:12, Greg KH wrote:
> On Tue, Nov 13, 2012 at 04:07:17PM +0800, Lan Tianyu wrote:
>> +	for (i = 1; i <= ports; i++) {
>> +		if (usb_get_hub_port_connect_type(
>> +				ehci_to_hcd(ehci)->self.root_hub, i)
>> +				== USB_PORT_CONNECT_TYPE_HARD_WIRED)
>> +			desc->u.hs.DeviceRemovable[i/8] |= 1 << (i%8);
>> +	}
>> +
>> +
> 
> I'm amazed that checkpatch.pl doesn't throw up all over this.  Sneaky
> way of getting around it by messing with the line breaks.  Please fix
> this pattern up, you also do it in other places in this series.
> 
Hi greg:
	How about this?

for (i = 1; i <= ports; i++) {
	hdev = ehci_to_hcd(ehci)->self.root_hub;
	connect_type = usb_get_hub_port_connect_type(hdev, i)
	if (connect type == USB_PORT_CONNECT_TYPE_HARD_WIRED)
		desc->u.hs.DeviceRemovable[i/8] |= 1 << (i%8);
}

> greg k-h
> 


-- 
Best regards
Tianyu Lan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux