Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Pierre-Yves Kerbrat and committed by
Greg Kroah-Hartman
dd1203c9 4d72e35d

+3 -3
+3 -3
drivers/usb/storage/karma.c
··· 105 105 */ 106 106 static int rio_karma_send_command(char cmd, struct us_data *us) 107 107 { 108 - int result, partial; 108 + int result; 109 109 unsigned long timeout; 110 110 static unsigned char seq = 1; 111 111 struct karma_data *data = (struct karma_data *) us->extra; ··· 119 119 timeout = jiffies + msecs_to_jiffies(6000); 120 120 for (;;) { 121 121 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, 122 - us->iobuf, RIO_SEND_LEN, &partial); 122 + us->iobuf, RIO_SEND_LEN, NULL); 123 123 if (result != USB_STOR_XFER_GOOD) 124 124 goto err; 125 125 126 126 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, 127 - data->recv, RIO_RECV_LEN, &partial); 127 + data->recv, RIO_RECV_LEN, NULL); 128 128 if (result != USB_STOR_XFER_GOOD) 129 129 goto err; 130 130