From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH 1/5] staging: vt6655: Use ether_crc in kernel.
Date: Sun, 17 Aug 2014 20:42:25 +0100 [thread overview]
Message-ID: <1408304549-22363-1-git-send-email-tvboxspy@gmail.com> (raw)
ether_crc is already in kernel remove local code and
include linux/crc32.h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6655/device.h | 1 +
drivers/staging/vt6655/device_main.c | 17 -----------------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index e4c5292..fadebe9 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -49,6 +49,7 @@
#include <linux/sched.h>
#include <linux/io.h>
#include <linux/if.h>
+#include <linux/crc32.h>
//#include <linux/config.h>
#include <linux/uaccess.h>
#include <linux/proc_fs.h>
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index a44233c..95460d4 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -2561,23 +2561,6 @@ static irqreturn_t device_intr(int irq, void *dev_instance)
return IRQ_RETVAL(handled);
}
-static unsigned const ethernet_polynomial = 0x04c11db7U;
-static inline u32 ether_crc(int length, unsigned char *data)
-{
- int crc = -1;
-
- while (--length >= 0) {
- unsigned char current_octet = *data++;
- int bit;
-
- for (bit = 0; bit < 8; bit++, current_octet >>= 1) {
- crc = (crc << 1) ^
- ((crc < 0) ^ (current_octet & 1) ? ethernet_polynomial : 0);
- }
- }
- return crc;
-}
-
//2008-8-4 <add> by chester
static int Config_FileGetParameter(unsigned char *string,
unsigned char *dest, unsigned char *source)
--
1.9.1
next reply other threads:[~2014-08-17 19:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-17 19:42 Malcolm Priestley [this message]
2014-08-17 19:42 ` [PATCH 2/5] staging: vt6655: main_usb.c remove undefined PLICE_DEBUG code Malcolm Priestley
2014-08-17 19:42 ` [PATCH 3/5] staging: vt6655: remove PLICE_DEBUG where it is defined Malcolm Priestley
2014-08-17 19:42 ` [PATCH 4/5] staging: vt6655: vntwifi.c remove unused directive PLICE_DEBUG Malcolm Priestley
2014-08-17 19:42 ` [PATCH 5/5] staging: vt6655: remove remaining comments of PLICE_DEBUG Malcolm Priestley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408304549-22363-1-git-send-email-tvboxspy@gmail.com \
--to=tvboxspy@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox