Re: [PATCH] More USB fixes for 2.5.68

From: Greg KH (greg@kroah.com)
Date: Thu Apr 24 2003 - 18:47:32 EST


ChangeSet 1.1165.2.6, 2003/04/23 12:06:40-07:00, baldrick@wanadoo.fr

[PATCH] USB speedtouch: crc optimization

 drivers/usb/misc/speedtch.c | 8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -Nru a/drivers/usb/misc/speedtch.c b/drivers/usb/misc/speedtch.c
--- a/drivers/usb/misc/speedtch.c Thu Apr 24 16:26:18 2003
+++ b/drivers/usb/misc/speedtch.c Thu Apr 24 16:26:18 2003
@@ -406,11 +406,12 @@
 ** encode **
 *************/
 
+static const unsigned char zeros[ATM_CELL_PAYLOAD];
+
 static void udsl_groom_skb (struct atm_vcc *vcc, struct sk_buff *skb)
 {
         struct udsl_control *ctrl = UDSL_SKB (skb);
- unsigned int i, zero_padding;
- unsigned char zero = 0;
+ unsigned int zero_padding;
         u32 crc;
 
         ctrl->atm_data.vcc = vcc;
@@ -436,8 +437,7 @@
         ctrl->aal5_trailer [3] = skb->len;
 
         crc = crc32_be (~0, skb->data, skb->len);
- for (i = 0; i < zero_padding; i++)
- crc = crc32_be (crc, &zero, 1);
+ crc = crc32_be (crc, zeros, zero_padding);
         crc = crc32_be (crc, ctrl->aal5_trailer, 4);
         crc = ~crc;
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 30 2003 - 22:00:19 EST