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

USB: serial: iuu_phoenix: drop unused URB submission results

The driver is submitting URBs in various completion callbacks without
bothering to log errors yet still assigned the return value to temporary
variables. Let's drop those temporaries.

This suppresses the corresponding W=1 (-Wunused-but-set-variable)
warnings.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>

+4 -8
+4 -8
drivers/usb/serial/iuu_phoenix.c
··· 158 158 static void iuu_rxcmd(struct urb *urb) 159 159 { 160 160 struct usb_serial_port *port = urb->context; 161 - int result; 162 161 int status = urb->status; 163 162 164 163 if (status) { ··· 173 174 port->bulk_out_endpointAddress), 174 175 port->write_urb->transfer_buffer, 1, 175 176 read_rxcmd_callback, port); 176 - result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 177 + usb_submit_urb(port->write_urb, GFP_ATOMIC); 177 178 } 178 179 179 180 static int iuu_reset(struct usb_serial_port *port, u8 wt) ··· 240 241 static void iuu_status_callback(struct urb *urb) 241 242 { 242 243 struct usb_serial_port *port = urb->context; 243 - int result; 244 244 int status = urb->status; 245 245 246 246 dev_dbg(&port->dev, "%s - status = %d\n", __func__, status); ··· 248 250 port->bulk_in_endpointAddress), 249 251 port->read_urb->transfer_buffer, 256, 250 252 iuu_update_status_callback, port); 251 - result = usb_submit_urb(port->read_urb, GFP_ATOMIC); 253 + usb_submit_urb(port->read_urb, GFP_ATOMIC); 252 254 } 253 255 254 256 static int iuu_status(struct usb_serial_port *port) ··· 349 351 static void iuu_led_activity_on(struct urb *urb) 350 352 { 351 353 struct usb_serial_port *port = urb->context; 352 - int result; 353 354 char *buf_ptr = port->write_urb->transfer_buffer; 354 355 *buf_ptr++ = IUU_SET_LED; 355 356 if (xmas) { ··· 363 366 port->bulk_out_endpointAddress), 364 367 port->write_urb->transfer_buffer, 8 , 365 368 iuu_rxcmd, port); 366 - result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 369 + usb_submit_urb(port->write_urb, GFP_ATOMIC); 367 370 } 368 371 369 372 static void iuu_led_activity_off(struct urb *urb) 370 373 { 371 374 struct usb_serial_port *port = urb->context; 372 - int result; 373 375 char *buf_ptr = port->write_urb->transfer_buffer; 374 376 if (xmas) { 375 377 iuu_rxcmd(urb); ··· 382 386 port->bulk_out_endpointAddress), 383 387 port->write_urb->transfer_buffer, 8 , 384 388 iuu_rxcmd, port); 385 - result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 389 + usb_submit_urb(port->write_urb, GFP_ATOMIC); 386 390 } 387 391 388 392