Commit dd1203c9 authored by Pierre-Yves Kerbrat's avatar Pierre-Yves Kerbrat Committed by Greg Kroah-Hartman

usb: storage: karma: remove useless variable

Remove the useless variable 'partial' storing the actual length
transferred. Nothing was done with it, so simply get rid of it
as usb_stor_bulk_transfer_buf can handle having NULL instead.

This also fixes the following sparse issues (-Wtypesign):
drivers/usb/storage/karma.c:122:51: warning: incorrect type in argument
5 (different signedness)
drivers/usb/storage/karma.c:122:51:    expected unsigned int *act_len
drivers/usb/storage/karma.c:122:51:    got int *<noident>
drivers/usb/storage/karma.c:127:52: warning: incorrect type in argument
5 (different signedness)
drivers/usb/storage/karma.c:127:52:    expected unsigned int *act_len
drivers/usb/storage/karma.c:127:52:    got int *<noident>
Signed-off-by: default avatarPierre-Yves Kerbrat <pkerbrat@free.fr>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d72e35d
...@@ -105,7 +105,7 @@ static struct us_unusual_dev karma_unusual_dev_list[] = { ...@@ -105,7 +105,7 @@ static struct us_unusual_dev karma_unusual_dev_list[] = {
*/ */
static int rio_karma_send_command(char cmd, struct us_data *us) static int rio_karma_send_command(char cmd, struct us_data *us)
{ {
int result, partial; int result;
unsigned long timeout; unsigned long timeout;
static unsigned char seq = 1; static unsigned char seq = 1;
struct karma_data *data = (struct karma_data *) us->extra; struct karma_data *data = (struct karma_data *) us->extra;
...@@ -119,12 +119,12 @@ static int rio_karma_send_command(char cmd, struct us_data *us) ...@@ -119,12 +119,12 @@ static int rio_karma_send_command(char cmd, struct us_data *us)
timeout = jiffies + msecs_to_jiffies(6000); timeout = jiffies + msecs_to_jiffies(6000);
for (;;) { for (;;) {
result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
us->iobuf, RIO_SEND_LEN, &partial); us->iobuf, RIO_SEND_LEN, NULL);
if (result != USB_STOR_XFER_GOOD) if (result != USB_STOR_XFER_GOOD)
goto err; goto err;
result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
data->recv, RIO_RECV_LEN, &partial); data->recv, RIO_RECV_LEN, NULL);
if (result != USB_STOR_XFER_GOOD) if (result != USB_STOR_XFER_GOOD)
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment