Peter Chen <peter.chen@xxxxxxxxxxxxx> writes: > + mutex_lock(&udc_lock); > + list_for_each_entry(udc, &udc_list, list) > + if (udc->gadget == gadget) > + goto found; > + mutex_unlock(&udc_lock); Not entirely specific to this patchset, but this search pattern is copied verbatim in udc-core.c like 5 times. Maybe it makes sense to make it a separate function? Regards, -- Alex -- 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