lkml.org 
[lkml]   [2003]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] More USB fixes for 2.5.68
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.062 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site