On Mon, May 24, 2010 at 02:36:24AM +0200, Yann Cantin wrote: > Hi > > Add a parameter to file_storage usb gadget module to be able to specify > the serial number of a device (for example, the serial number of an > emulated usb stick). > > Things i'm not sure i've done well about : > - 12 chars limitation for CBI transport : I need more (24 chars) for sticks serial, so i've > modified the static serial declaration, and cut this string (\0 in serial[12]) if CBI is selected. > - i've keep the serial static, but now that it can be modified, perhaps it should be integrated > in the mod_data struct. > - DRIVER_SERIAL_NUM_NOT_SET : i need a way to know if the parameter have been passed, only find that. > - hexadecimal characters check : is there a better way ? > - The string copy handling between char array (serial) and char pointer (serial_parm). I'm not sure > it's rock-solid. > - I keep the dead (moved) code enclosed in /* */ > > Be smart, it's my first day :) A hint, run your patch through the scripts/checkpatch.pl script before sending it off. It will tell you of any problems with it before sending it to us. In this case, it would have shown that you forgot a "Signed-off-by:" line which is required for having a patch accepted :) > > > --- linux-2.6.31/drivers/usb/gadget/file_storage.c.orig 2009-09-10 00:13:59.000000000 +0200 > +++ linux-2.6.31/drivers/usb/gadget/file_storage.c 2010-05-24 01:30:44.000000000 +0200 > @@ -56,7 +56,7 @@ It looks like you cut and pasted your patch, adding a ton of trailing whitespace. Please read the file, Documentation/email_clients.txt for how to properly send a patch off. Best bet is to just use the 'git send-email' script, it works quite well. 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