ChangeSet 1.1220, 2003/06/18 16:34:50-07:00, baldrick@wanadoo.fr [PATCH] USB speedtouch: send path micro optimizations drivers/usb/speedtouch.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff -Nru a/drivers/usb/speedtouch.c b/drivers/usb/speedtouch.c --- a/drivers/usb/speedtouch.c Wed Jun 18 17:36:03 2003 +++ b/drivers/usb/speedtouch.c Wed Jun 18 17:36:03 2003 @@ -167,8 +167,8 @@ struct atm_skb_data atm_data; unsigned int num_cells; unsigned int num_entire; - unsigned char cell_header [ATM_CELL_HEADER]; unsigned int pdu_padding; + unsigned char cell_header [ATM_CELL_HEADER]; unsigned char aal5_trailer [ATM_AAL5_TRAILER]; }; @@ -483,8 +483,7 @@ memset (target, 0, ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER); target += ATM_CELL_PAYLOAD - ATM_AAL5_TRAILER; - if (--ctrl->num_cells) - BUG(); + BUG_ON (--ctrl->num_cells); } memcpy (target, ctrl->aal5_trailer, ATM_AAL5_TRAILER); @@ -676,11 +675,11 @@ static void udsl_process_send (unsigned long data) { struct udsl_send_buffer *buf; - int err; struct udsl_instance_data *instance = (struct udsl_instance_data *) data; - unsigned int num_written; struct sk_buff *skb; struct udsl_sender *snd; + int err; + unsigned int num_written; made_progress: spin_lock_irq (&instance->send_lock); @@ -715,16 +714,15 @@ list_add (&snd->list, &instance->spare_senders); spin_unlock_irq (&instance->send_lock); list_add (&buf->list, &instance->filled_send_buffers); - return; + return; /* bail out */ } spin_lock_irq (&instance->send_lock); } /* while */ spin_unlock_irq (&instance->send_lock); - if (!instance->current_skb && !(instance->current_skb = skb_dequeue (&instance->sndqueue))) { + if (!instance->current_skb && !(instance->current_skb = skb_dequeue (&instance->sndqueue))) return; /* done - no more skbs */ - } skb = instance->current_skb;