On Fri, Dec 20, 2013 at 10:04:00AM -0000, David Laight wrote: > > From: Greg Kroah-Hartman > > CONFIG_USB_DEBUG is going away, so remove the few places in the USB core > > that relied on them. > > > > This means that we always now do the "debug" checks for every urb > > submitted, which is a good idea, as who knows how many driver bugs we > > have been ignoring when people forget to enable this option. Also, with > > the overall speed of USB, doing these extra checks should not cause any > > additional overhead. > > Well USB3 isn't that slow, and the new version coming along soon is > even faster. > Running gigabit ethernet on usb3 shows a significantly higher cpu > cost than when using a normal ethernet adapter - and really the actual > operations required are very similar. Yes, but the checks here are trivial compared to the overall issues that higher bus speeds are going to require us to make, if anything. > ... > > /* Check that the pipe's type matches the endpoint's type */ > > if (usb_pipetype(urb->pipe) != pipetypes[xfertype]) > > It looks as though it ought to be possible to make that check: > if (unlikely(xfertype != urb->pipe->valid_xfertype)) You should almost never use unlikely() on your own, in a driver, as the compiler should make better code without it. If you can provide numbers showing that this is faster, that would be great, otherwise I'll leave it alone. thanks, greg k-h -- 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