Hi, Le 26/05/2010 11:02, Michał Nazarewicz a écrit : >> Signed-off-by: Yann Cantin <yann.cantin@xxxxxxxxxxx> > > Be sure you understand the legal binding of the Sidned-off-by by which > you acknowledge > that you have the right to release the patch as GPLv2 (see > Documentation/SubmittingPatches). I agree i'm not on the bleeding edge (see below), but i've got some basis :) >> @@ -330,6 +332,7 @@ static struct { >> .vendor = FSG_VENDOR_ID, >> .product = FSG_PRODUCT_ID, >> .release = 0xffff, // Use controller chip type >> + .serial_parm = NULL, >> .buflen = 16384, >> }; >> > > This is no needed. Check out scripts/checkpatch.pl Greg mentioned. checkpatch.pl don't catch this, nor am i... I now see the point (some reading done...). > You traverse the serial twice, I'd go with first checking the letters and > getting the length so then it can be validated without strlen(). Also, Got it, back to work. > following > Alan's comment, instead of copying setting fsg_strings[FSG_STRING_SERIAL > - 1] should > work: > > if (mod_data.serial_parm) { > const char *ch; > unsigned len = 0; I'm not sure i understand, do you talk about something like : fsg_string_serial = serial_parm; after validation of serial_parm ? -- Yann Cantin A4FEB47F -- -- 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