Skip to contentSkip to conversation

lib-crc-ccitt-add-ccitt-false-crc16-variant.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 12, 2018

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: lib/crc-ccitt: add CCITT-FALSE CRC16 variant
has been removed from the -mm tree. Its filename was
lib-crc-ccitt-add-ccitt-false-crc16-variant.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Andrey Vostrikov <[email protected]>
Subject: lib/crc-ccitt: add CCITT-FALSE CRC16 variant

In support of a soon to be published MFD driver using serdev to talk to a supervisory processor that uses the CCITT-FALSE CRC16 variant in it's protocol, this patch was tested successfully on an i.MX6 ARM platform.

---

 include/linux/crc-ccitt.h |    7 ++++
 lib/crc-ccitt.c           |   58 +++++++++++++++++++++++++++++++++++-
 2 files changed, 64 insertions(+), 1 deletion(-)
include/linux/crc-ccitt.h renamed from include/linux/crc-ccitt.h~lib-crc-ccitt-add-ccitt-false-crc16-variant +7 -0
diff -puN include/linux/crc-ccitt.h~lib-crc-ccitt-add-ccitt-false-crc16-variant include/linux/crc-ccitt.h
@@ -5,12 +5,19 @@
 #include <linux/types.h>
 
 extern u16 const crc_ccitt_table[256];
+extern u16 const crc_ccitt_false_table[256];
 
 extern u16 crc_ccitt(u16 crc, const u8 *buffer, size_t len);
+extern u16 crc_ccitt_false(u16 crc, const u8 *buffer, size_t len);
 
 static inline u16 crc_ccitt_byte(u16 crc, const u8 c)
 {
 	return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff];
 }
 
+static inline u16 crc_ccitt_false_byte(u16 crc, const u8 c)
+{
+    return (crc << 8) ^ crc_ccitt_false_table[(crc >> 8) ^ c];
+}
+
 #endif /* _LINUX_CRC_CCITT_H */
lib/crc-ccitt.c renamed from lib/crc-ccitt.c~lib-crc-ccitt-add-ccitt-false-crc16-variant +57 -1

70 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are