ChangeSet 1.1155.3.5, 2003/05/19 10:47:09-07:00, mdharm-usb@one-eyed-alien.net [PATCH] USB: storage: remove inline function This patch removes a single-line inline function and replaces it with it's expansion everywhere. The inline function was really only there for a transitional step. diff -Nru a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c --- a/drivers/usb/storage/freecom.c Tue May 20 17:25:22 2003 +++ b/drivers/usb/storage/freecom.c Tue May 20 17:25:22 2003 @@ -134,7 +134,8 @@ /* Now transfer all of our blocks. */ US_DEBUGP("Start of read\n"); - result = usb_stor_bulk_transfer_srb(us, ipipe, srb, count); + result = usb_stor_bulk_transfer_sg(us, ipipe, srb->request_buffer, + count, srb->use_sg, &srb->resid); US_DEBUGP("freecom_readdata done!\n"); if (result > USB_STOR_XFER_SHORT) @@ -168,7 +169,8 @@ /* Now transfer all of our blocks. */ US_DEBUGP("Start of write\n"); - result = usb_stor_bulk_transfer_srb(us, opipe, srb, count); + result = usb_stor_bulk_transfer_sg(us, opipe, srb->request_buffer, + count, srb->use_sg, &srb->resid); US_DEBUGP("freecom_writedata done!\n"); if (result > USB_STOR_XFER_SHORT) diff -Nru a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c --- a/drivers/usb/storage/sddr09.c Tue May 20 17:25:22 2003 +++ b/drivers/usb/storage/sddr09.c Tue May 20 17:25:22 2003 @@ -1562,8 +1562,10 @@ "sending" : "receiving", srb->request_bufflen); - result = usb_stor_bulk_transfer_srb(us, pipe, srb, - srb->request_bufflen); + result = usb_stor_bulk_transfer_sg(us, pipe, + srb->request_buffer, + srb->request_bufflen, + srb->use_sg, &srb->resid); return (result == USB_STOR_XFER_GOOD ? USB_STOR_TRANSPORT_GOOD : USB_STOR_TRANSPORT_ERROR); diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c --- a/drivers/usb/storage/transport.c Tue May 20 17:25:22 2003 +++ b/drivers/usb/storage/transport.c Tue May 20 17:25:22 2003 @@ -779,8 +779,9 @@ if (transfer_length) { unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ? us->recv_bulk_pipe : us->send_bulk_pipe; - result = usb_stor_bulk_transfer_srb(us, pipe, srb, - transfer_length); + result = usb_stor_bulk_transfer_sg(us, pipe, + srb->request_buffer, transfer_length, + srb->use_sg, &srb->resid); US_DEBUGP("CBI data stage result is 0x%x\n", result); if (result == USB_STOR_XFER_ERROR) return USB_STOR_TRANSPORT_ERROR; @@ -869,8 +870,9 @@ if (transfer_length) { unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ? us->recv_bulk_pipe : us->send_bulk_pipe; - result = usb_stor_bulk_transfer_srb(us, pipe, srb, - transfer_length); + result = usb_stor_bulk_transfer_sg(us, pipe, + srb->request_buffer, transfer_length, + srb->use_sg, &srb->resid); US_DEBUGP("CB data stage result is 0x%x\n", result); if (result == USB_STOR_XFER_ERROR) return USB_STOR_TRANSPORT_ERROR; @@ -951,8 +953,9 @@ if (transfer_length) { unsigned int pipe = srb->sc_data_direction == SCSI_DATA_READ ? us->recv_bulk_pipe : us->send_bulk_pipe; - result = usb_stor_bulk_transfer_srb(us, pipe, srb, - transfer_length); + result = usb_stor_bulk_transfer_sg(us, pipe, + srb->request_buffer, transfer_length, + srb->use_sg, &srb->resid); US_DEBUGP("Bulk data transfer result 0x%x\n", result); if (result == USB_STOR_XFER_ERROR) return USB_STOR_TRANSPORT_ERROR; diff -Nru a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h --- a/drivers/usb/storage/transport.h Tue May 20 17:25:22 2003 +++ b/drivers/usb/storage/transport.h Tue May 20 17:25:22 2003 @@ -178,10 +178,4 @@ extern int usb_stor_bulk_transfer_sg(struct us_data *us, unsigned int pipe, void *buf, unsigned int length, int use_sg, int *residual); -static __inline__ int usb_stor_bulk_transfer_srb(struct us_data *us, - unsigned int pipe, Scsi_Cmnd *srb, unsigned int length) { - return usb_stor_bulk_transfer_sg(us, pipe, srb->request_buffer, - length, srb->use_sg, &srb->resid); -} - #endif