On Mon, 17 Oct 2011, Michal Nazarewicz wrote: > On Mon, 17 Oct 2011 02:01:48 -0700, Yuping Luo <lypingsh@xxxxxxxxx> wrote: > > here you are , :) > > > > diff --git a/drivers/usb/gadget/f_mass_storage.c > > b/drivers/usb/gadget/f_mass_storage.c > > index 524381a..6a5c42d 100644 > > --- a/drivers/usb/gadget/f_mass_storage.c > > +++ b/drivers/usb/gadget/f_mass_storage.c > > @@ -379,6 +379,7 @@ struct fsg_common { > > enum data_direction data_dir; > > u32 data_size; > > u32 data_size_from_cmnd; > > + u32 data_size_is_in_blocks; > > Personally, I'd make it an argument to check_command() or create a simple > wrapper for check_command() that calculates the size. I considered making this a new argument to check_command(). In the end I decided against it, because check_command() already has a lot of arguments, and also it would be necessary to add the new argument to every call (of which there are quite a few). Using a wrapper routine is a good idea -- it didn't occur to me before. Alan Stern -- 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