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

ipwireless: Do not return value from sending funcs

ipwireless: Do not return value from sending funcs

Do not return value from do_send_fragment and do_send_packet, it's not used.
The packet size checks are not useful too:

* zero length packet will never be sent, caller always passes packet_header
size which is either 1 or 3
* MTU check is done in caller, no need to repeat

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Sterba and committed by
Linus Torvalds
93110f69 d54c2752

+3 -12
+3 -12
drivers/char/pcmcia/ipwireless/hardware.c
··· 400 400 #endif 401 401 } 402 402 403 - static int do_send_fragment(struct ipw_hardware *hw, unsigned char *data, 403 + static void do_send_fragment(struct ipw_hardware *hw, unsigned char *data, 404 404 unsigned length) 405 405 { 406 406 unsigned i; 407 407 unsigned long flags; 408 408 409 409 start_timing(); 410 - 411 - if (length == 0) 412 - return 0; 413 - 414 - if (length > hw->ll_mtu) 415 - return -1; 410 + BUG_ON(length > hw->ll_mtu); 416 411 417 412 if (ipwireless_debug) 418 413 dump_data_bytes("send", data, length); ··· 453 458 spin_unlock_irqrestore(&hw->lock, flags); 454 459 455 460 end_write_timing(length); 456 - 457 - return 0; 458 461 } 459 462 460 - static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) 463 + static void do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) 461 464 { 462 465 unsigned short fragment_data_len; 463 466 unsigned short data_left = packet->length - packet->offset; ··· 515 522 packet->length); 516 523 kfree(packet); 517 524 } 518 - 519 - return 0; 520 525 } 521 526 522 527 static void ipw_setup_hardware(struct ipw_hardware *hw)