diff options
author | David Sterba <dsterba@suse.cz> | 2008-07-28 10:53:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 11:28:03 -0400 |
commit | 93110f698fe92fc4dfd86c78783aedf522c69eb9 (patch) | |
tree | 2150a7a7614ab6149b8351a43495720b1e6caf9f | |
parent | d54c2752f6bb6cc53359dcdf6ed4fb6e5fb6440a (diff) |
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>
-rw-r--r-- | drivers/char/pcmcia/ipwireless/hardware.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c index 08423ba5b9dd..ff2093d22109 100644 --- a/drivers/char/pcmcia/ipwireless/hardware.c +++ b/drivers/char/pcmcia/ipwireless/hardware.c | |||
@@ -400,19 +400,14 @@ static void swap_packet_bitfield_from_le(unsigned char *data) | |||
400 | #endif | 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 | unsigned length) | 404 | unsigned length) |
405 | { | 405 | { |
406 | unsigned i; | 406 | unsigned i; |
407 | unsigned long flags; | 407 | unsigned long flags; |
408 | 408 | ||
409 | start_timing(); | 409 | start_timing(); |
410 | 410 | BUG_ON(length > hw->ll_mtu); | |
411 | if (length == 0) | ||
412 | return 0; | ||
413 | |||
414 | if (length > hw->ll_mtu) | ||
415 | return -1; | ||
416 | 411 | ||
417 | if (ipwireless_debug) | 412 | if (ipwireless_debug) |
418 | dump_data_bytes("send", data, length); | 413 | dump_data_bytes("send", data, length); |
@@ -458,11 +453,9 @@ static int do_send_fragment(struct ipw_hardware *hw, unsigned char *data, | |||
458 | spin_unlock_irqrestore(&hw->lock, flags); | 453 | spin_unlock_irqrestore(&hw->lock, flags); |
459 | 454 | ||
460 | end_write_timing(length); | 455 | end_write_timing(length); |
461 | |||
462 | return 0; | ||
463 | } | 456 | } |
464 | 457 | ||
465 | static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) | 458 | static void do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) |
466 | { | 459 | { |
467 | unsigned short fragment_data_len; | 460 | unsigned short fragment_data_len; |
468 | unsigned short data_left = packet->length - packet->offset; | 461 | unsigned short data_left = packet->length - packet->offset; |
@@ -522,8 +515,6 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) | |||
522 | packet->length); | 515 | packet->length); |
523 | kfree(packet); | 516 | kfree(packet); |
524 | } | 517 | } |
525 | |||
526 | return 0; | ||
527 | } | 518 | } |
528 | 519 | ||
529 | static void ipw_setup_hardware(struct ipw_hardware *hw) | 520 | static void ipw_setup_hardware(struct ipw_hardware *hw) |