Skip to contentSkip to conversation

lib-crc_ccitt_false-is-identical-to-crc_itu_t.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Dec 29, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib: crc_ccitt_false() is identical to crc_itu_t()
has been removed from the -mm tree. Its filename was
lib-crc_ccitt_false-is-identical-to-crc_itu_t.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Mathis Marion <[email protected]>
Subject: lib: crc_ccitt_false() is identical to crc_itu_t()
Date: Tue, 19 Dec 2023 14:11:54 +0100

crc_ccitt_false() was introduced in commit 0d85adb5fbd33 ("lib/crc-ccitt:
Add CCITT-FALSE CRC16 variant"), but it is redundant with crc_itu_t(). Since the latter is more used, it is the one being kept.

---

 Documentation/driver-api/surface_aggregator/ssh.rst |    2 
 drivers/mfd/Kconfig                                 |    2 
 drivers/mfd/rave-sp.c                               |    4 
 drivers/platform/surface/aggregator/Kconfig         |    2 
 include/linux/crc-ccitt.h                           |    7 -
 include/linux/surface_aggregator/serial_hub.h       |    4 
 lib/crc-ccitt.c                                     |   55 ----------
 7 files changed, 7 insertions(+), 69 deletions(-)
Documentation/driver-api/surface_aggregator/ssh.rst renamed from Documentation/driver-api/surface_aggregator/ssh.rst~lib-crc_ccitt_false-is-identical-to-crc_itu_t +1 -1
@@ -39,7 +39,7 @@ Note that the standard disclaimer for th
 document: All of this has been reverse-engineered and may thus be erroneous
 and/or incomplete.
 
-All CRCs used in the following are two-byte ``crc_ccitt_false(0xffff, ...)``.
+All CRCs used in the following are two-byte ``crc_itu_t(0xffff, ...)``.
 All multi-byte values are little-endian, there is no implicit padding between
 values.
 
drivers/mfd/Kconfig renamed from drivers/mfd/Kconfig~lib-crc_ccitt_false-is-identical-to-crc_itu_t +1 -1
@@ -2255,7 +2255,7 @@ config MFD_VEXPRESS_SYSREG
 config RAVE_SP_CORE
 	tristate "RAVE SP MCU core driver"
 	depends on SERIAL_DEV_BUS
-	select CRC_CCITT
+	select CRC_ITU_T
 	help
 	  Select this to get support for the Supervisory Processor
 	  device found on several devices in RAVE line of hardware.
drivers/mfd/rave-sp.c renamed from drivers/mfd/rave-sp.c~lib-crc_ccitt_false-is-identical-to-crc_itu_t +2 -2
@@ -9,7 +9,7 @@
  */
 
 #include <linux/atomic.h>
-#include <linux/crc-ccitt.h>
+#include <linux/crc-itu-t.h>
 #include <linux/delay.h>
 #include <linux/export.h>
 #include <linux/init.h>
@@ -251,7 +251,7 @@ static void csum_8b2c(const u8 *buf, siz
 
 static void csum_ccitt(const u8 *buf, size_t size, u8 *crc)
 {
-	const u16 calculated = crc_ccitt_false(0xffff, buf, size);
+	const u16 calculated = crc_itu_t(0xffff, buf, size);
 
 	/*
 	 * While the rest of the wire protocol is little-endian,
drivers/platform/surface/aggregator/Kconfig renamed from drivers/platform/surface/aggregator/Kconfig~lib-crc_ccitt_false-is-identical-to-crc_itu_t +1 -1
@@ -5,7 +5,7 @@ menuconfig SURFACE_AGGREGATOR
 	tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers"
 	depends on SERIAL_DEV_BUS
 	depends on ACPI && !RISCV
-	select CRC_CCITT
+	select CRC_ITU_T
 	help
 	  The Surface System Aggregator Module (Surface SAM or SSAM) is an
 	  embedded controller (EC) found on 5th- and later-generation Microsoft
include/linux/crc-ccitt.h renamed from include/linux/crc-ccitt.h~lib-crc_ccitt_false-is-identical-to-crc_itu_t +0 -7
@@ -5,19 +5,12 @@
 #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 */
include/linux/surface_aggregator/serial_hub.h renamed from include/linux/surface_aggregator/serial_hub.h~lib-crc_ccitt_false-is-identical-to-crc_itu_t +2 -2
@@ -12,7 +12,7 @@
 #ifndef _LINUX_SURFACE_AGGREGATOR_SERIAL_HUB_H
 #define _LINUX_SURFACE_AGGREGATOR_SERIAL_HUB_H
 
-#include <linux/crc-ccitt.h>
+#include <linux/crc-itu-t.h>
 #include <linux/kref.h>
 #include <linux/ktime.h>
 #include <linux/list.h>
@@ -188,7 +188,7 @@ static_assert(sizeof(struct ssh_command)
  */
 static inline u16 ssh_crc(const u8 *buf, size_t len)
 {
-	return crc_ccitt_false(0xffff, buf, len);
+	return crc_itu_t(0xffff, buf, len);
 }
 
 /*
lib/crc-ccitt.c renamed from lib/crc-ccitt.c~lib-crc_ccitt_false-is-identical-to-crc_itu_t +0 -55

66 lines not on this page · raw message

_

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