Re: [PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer

2013-11-01 Thread Ming Lei
On Fri, Nov 1, 2013 at 10:54 PM, Alan Stern wrote: > On Wed, 30 Oct 2013, Ming Lei wrote: > >> We have sg_miter_* APIs for accessing scsi sg buffer, so >> use them to make code clean and bug free. > > Hmmm. You could simply call sg_copy_buffer, if you didn't mind the > quadratic penalty for the s

Re: [PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer

2013-11-01 Thread Alan Stern
On Wed, 30 Oct 2013, Ming Lei wrote: > We have sg_miter_* APIs for accessing scsi sg buffer, so > use them to make code clean and bug free. Hmmm. You could simply call sg_copy_buffer, if you didn't mind the quadratic penalty for the sg_miter_skip operations. > --- a/drivers/usb/storage/protoco

[PATCH 2/2] USB: storage: use sg_miter_* APIs to access scsi buffer

2013-10-29 Thread Ming Lei
We have sg_miter_* APIs for accessing scsi sg buffer, so use them to make code clean and bug free. Cc: Matthew Dharm Cc: Alan Stern Cc: Greg Kroah-Hartman Signed-off-by: Ming Lei --- drivers/usb/storage/protocol.c | 82 ++-- 1 file changed, 28 insertions(