On 07/23/2013 09:57 PM, Greg KH wrote: > On Tue, Jul 23, 2013 at 04:30:29AM -0500, Josef Schimke wrote: >> wrt that: >> 1. Am I on the right track thinking like that? >> 2. Does the USB stuff in the kernel already have a way to test this? >> 3. If not, I'm really stumped about how I can do this, so any advice >> would be great. :p >> >> Aside from that - in hid_start_in(), would it have been better if I'd >> used goto and a label instead of breaking from the for loop? I wouldn't >> have to test if (rc == 0) to clear that HID_NO_BANDWIDTH bit that way, >> but it seemed more messy. > > I'd recommend just always using 2 interrupt urbs, it can't hurt other > devices / host controllers if it's always there. Sounds good to me. :) Do you think I should re-write the patch to save a kmalloc(), an int in the usbhid_device struct, and some complexity by swapping my "struct urb **inurbs" to something like "struct urb urbin[NUM_INPUT_URBS]" instead? I'm not trying to nitpick about my own patch, but being clear about stuff like that will definitely help me learn what's expected of my code. :) I wrote my current patch the way I did thinking that it might be useful to dynamically figure out how many URBs are needed (which is the part I couldn't do :p) - but I simply don't have the knowledge needed to be able to say for certain if that was a good idea. But I'm leaning toward the thought that >2 URBs might never be needed for this driver. Jiri, will you also give your advice to me about this too please, along with any comments about my current patch? >> ***snipped my patch here*** > > A hint, run your patch through scripts/checkpatch.pl so that people > don't complain about coding style issues next time :) Will do. :) > > I can't see anything really wrong with this, care to resend it with a > signed-off-by: line so that Jiri can apply it (if he agrees with it?) I appreciate every bit of help and advice you, Alan, and (soon, I think!) Jiri have given me. :) I'd like to be as helpful as I can in the future, and you guys are setting me on the right track. I have a couple more ropes to jump over: The SubmittingPatches doc confuses me a bit, so can you tell me if I should submit patches to linux-usb when they relate to things like this, or should I submit them straight to the main list, or...? > > thanks, > > greg k-h > Regards, Josef/sgtcapslock -- 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