From nobody Fri Dec 19 11:06:34 2025 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2062.outbound.protection.outlook.com [40.107.243.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E983319444 for ; Tue, 19 Dec 2023 13:12:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=silabs.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=silabs.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=silabs.com header.i=@silabs.com header.b="X/b6ksLu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dj4mg3H+/taUmh6aHtv7DzgPgH/UOaAjJGTgZyyywNifYv6Slrtu77lMFQZxYZnkBGhXM5PIIffFm6KvCM8QfRnUeJZNUaPpoUon8Bzpt7IqC7R2s6bZUDsYEU1Dl+7NW178uI2Uzt0fPJr0ahEN2tMxaL6HVdtzOOVoNHk0qHh7G7H1Hlw8LzCqAG9oxnenX7PwfAA1ag1QQo3gpPWbXAXbGFBhbBUPD3GFbcORJVPVdux2Ui1OCx16/41EA0QGYHAmKN/VG7v9z3RowJ8gnlSLFOEDRwcNj1Ce0kYVu+5pZQYES8xD5ahgYtROiqP4XqMWshAIflGgsBFfPvaxPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nT25liV+rUwPiMs9Lcb+bi0USz+hPPoiJkE2ax6gyZw=; b=M7exS3udg37Aeay46M20oQHVZ7jiZOtirAdMRkn3RguHlLmgs6jtUMXqTmy6bBbWCUS+N2mjxcFlSqmAVeR6M1h++8lQj1oxn9hEN85YeFiU8HcGiiXSp/9bYGYDvDReKa265AImHfGPAN8wyTXyNpfHHiRYoNlf6/oZIkbkrcNtBvvHPvzorWFRvEbMk2snyQXc3EQ9T9gQ9+7D1RmkMMg0uCQEbzYhTvx5o+ymphRFvxbuXZ1/5bCCf/B5MwSqGItV7tCuvlzeYkoKyYDN8mRjDPROgNpYyZMboR/8pSefKQ4K3yeOWwJwf5jHytoBXEZ+f2ekxB1PqsFZawkYGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nT25liV+rUwPiMs9Lcb+bi0USz+hPPoiJkE2ax6gyZw=; b=X/b6ksLuDxdVbEqDeNsufXWzodYI0dry6PxzYqm345cwfz2gPYWpIx35C9rnt1vFwo3kHQiHF28P3tWm8roG5OB/N7Hbo2A9kGrV0q1DVQwHGV66Oz+q9W0ECC/8XdVHo7NOCh29DQID886IjsE9E2+4Xzq/O60oUknrWf1Hdys= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from MN2PR11MB4711.namprd11.prod.outlook.com (2603:10b6:208:24e::13) by PH7PR11MB7074.namprd11.prod.outlook.com (2603:10b6:510:20d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Tue, 19 Dec 2023 13:12:48 +0000 Received: from MN2PR11MB4711.namprd11.prod.outlook.com ([fe80::790c:96b7:b2ba:d7df]) by MN2PR11MB4711.namprd11.prod.outlook.com ([fe80::790c:96b7:b2ba:d7df%5]) with mapi id 15.20.7113.016; Tue, 19 Dec 2023 13:12:48 +0000 From: Mathis Marion To: Andrew Morton , linux-kernel@vger.kernel.org Cc: Andrey Vostrikov , Andrey Smirnov , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= , Mathis Marion Subject: [PATCH] lib: crc_ccitt_false() is identical to crc_itu_t() Date: Tue, 19 Dec 2023 14:11:54 +0100 Message-ID: <20231219131154.748577-1-Mathis.Marion@silabs.com> X-Mailer: git-send-email 2.43.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: PR1P264CA0178.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:344::16) To MW3PR11MB4714.namprd11.prod.outlook.com (2603:10b6:303:5d::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR11MB4711:EE_|PH7PR11MB7074:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c7056fe-7097-422e-8764-08dc00943102 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6R47Lp+31MHt3cGK7aW9xd6RTzkb3lEPzUUbcV1s5HrmOD6tDlYqN5jBaU1AQ/aJw4Y8BRnbSsBEj6RLEmQ1zvZpYEQeo0dxMuJ9nfb3LNmVNTrkakOGO0LcAww18AmX27PzlP8tWikdc8auOCN7qlV7ypmLot/TGYchetYuTZTXC+R4LzYFzbF/e+6hlVMHeh0tqJ+HJ+Skqql9KN6pusXkZx8QcVwTrXeZJUatp7OmdTq84VaWvTlzI8mDa/o7n4LgmPzh9Anc7fDLplH+uCcXX+fkj/gnXLCBfm+HIwPvV0tlGOnHtaE3wIyzQ8hExMYRpV+9GNSEmH4FqZvh5+UC2pT2zcz2UqCpBdSKvfPxMbZQBA/A73jLSTQN2d7gYxqHdi0OU8EFA+2q7NRgaNdNOYHYZ8rR/zVnIZGp6zAbTYlRw3R4uL1a9svRSdyKkaLppi15pH/7qRjMuDSIFS6wUdBOW0xAbWs38m/gWjRIU9NmW0jj7EK3cwVUG2eVd0cTH7vBIxcyHumiKlPYl1TfRmaT86FTqu4lxd6+Yv/835xAKG6PMPGLc+to3lb18dhhFDmH7PM+4O1FIxu/uCPzX36AdVJ64oDDp6M2AMZ7w+zN0FfIHlJZaSab4f9bukuZCUB5XKxyU2wEJLkktQPQ4qfL54ACIjABLygPVws= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR11MB4711.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(396003)(366004)(136003)(376002)(39860400002)(230373577357003)(230473577357003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(2906002)(5660300002)(38350700005)(41300700001)(86362001)(36756003)(26005)(1076003)(6486002)(107886003)(2616005)(66946007)(66556008)(83380400001)(316002)(54906003)(478600001)(66476007)(52116002)(6506007)(38100700002)(45080400002)(6512007)(6666004)(4326008)(8676002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?LM8+Os+ZU/VTVNFgbFuYS2hXAeKA1cmhQl/TVX88WQQ0dRds50P+SwTA371q?= =?us-ascii?Q?MmD2mFWi5v2Ujuj5vjhW4WxynqFpTtH4RUaZpWAFNvE2odDg0HLZ9NxT5Uev?= =?us-ascii?Q?ASa19sc0jp/3VFRF2YLTT5M5RycykfNQerdV3yXLYhTaKLY5UHYFB7n1oha1?= =?us-ascii?Q?pO1cGv1XbeaYt+NL3Ofdk8yzFgICo+o6sKqJHqA7Jug5uw+LjNfJC7Zw5JjW?= =?us-ascii?Q?YC6Xfl4/tZVnDK2rvaw6grK1uk23rHgVJEIIbMy5uUjS9RDpgCI2MGlGyBd8?= =?us-ascii?Q?TBBl9fYlVefV4L/NUC+R3aRf/nr724dkcQnTYwms1YBnsufxFCB6heGPs36X?= =?us-ascii?Q?YtSIzq/euswrA2UffcsyhyTmEQ5nWk4rwQai4/eYbU2fPNlP1KHZCvZ0c3+r?= =?us-ascii?Q?mE9IqZJPHRXVVYusZHuSUL9Poub3qO6cFO7y4pb42qPSMM88h94zhd5XS2Ve?= =?us-ascii?Q?QCt2+vK1hg8JbA0ssQxAjyTRhM+vRKKXKI/SraATjm8ru8cxB5ZJIlzEEQjH?= =?us-ascii?Q?RDIUoy5qrFEz3yVF6A/pg/fiCkkHqoERZzdzlvMcK2F7yCHyTpjWClsNu1WP?= =?us-ascii?Q?NLy32ivv1zdvh54+qu+Bl+hbI0zAx9AA4pBvqdyWpVsA5hzBwgn56PGwHGFE?= =?us-ascii?Q?vtT/4q3Jk5xH7bheS7ySKCnWZHc6/AY0bYNWhNtnvqPbVeB0Y+3OMbaIduNY?= =?us-ascii?Q?KeAZ/d4iGe1Lrxu+7plKLee/lwOOv+cBp3oBSCCrcaP8y+lSmiOKufIJ0NmC?= =?us-ascii?Q?l2B0uUvr3wqg+wKDo+uwKgpnZMOK6A/KJbK07VrIvdNswPbxClfXfMhYqbd2?= =?us-ascii?Q?wS/TBlOqT+coxvoytx1qsSZvkbmuoV/jAKkxr+XKWbywBcLQs2nf5wUrQlLj?= =?us-ascii?Q?KDBOjC6KOxKBH72yVzb/jhbzvEqOGAwyC+JHh/Ign5jGfeJH+5UjROQIiodh?= =?us-ascii?Q?8RIYLzFgwqys8tOCCNiYcf06CmkntaeJMHGhsudwaHGZuh+iKijDTIqbogif?= =?us-ascii?Q?ha2DRGBjUy64FXGd5Nhk+jToXsmcHQz+CgZ6lPow+uBRg5rauCFPAkD+DzYg?= =?us-ascii?Q?++MMKIRKDET23E4Xk6DTPdsJu+/G1MlooV0NEY7tkXnbMRby6OrqyDI34RCO?= =?us-ascii?Q?80rAGx/Rblq9oMXQkcL2ujjtVGYF0y720tW+PJuFMymEIHELSgpF7rG9JykN?= =?us-ascii?Q?fiVbM9d9nDWNMUTAFYLmQMGUPQHh0bdsNCP3k9/5QvD2H3oCQtgDnio/SJqp?= =?us-ascii?Q?IxBrECBv9p058Nr8MsS9qbX8sKAkqjHv2WrDAqW7rM+56ubHmPPa3inwyf1l?= =?us-ascii?Q?B/HmGY9zuoS1OLQ3OItYWp6nh/Z9Ik35PKfJHX8zZf4VPDb/PJYGYTXe4rOm?= =?us-ascii?Q?t8/A29owASZUJMf8Dyoon7lwm0pGI3xJtKFtnwkdKGA3TpsuGsRsrEFjDFjB?= =?us-ascii?Q?7JR02ThIDGXiEy337wN6c/UFNmDUw0ucfmjEhpnkkUfumIO5IvE5QEn2VgDM?= =?us-ascii?Q?DTPHwVpc5Db5FSD7L8L9xn5WKet+z8nC8+PVzoHd9XtpLuY7CqmvKqtoziYr?= =?us-ascii?Q?7Gi1XG9FMXzgNTLCaMcvXb9iGwVbSYJLFNcK3COk?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c7056fe-7097-422e-8764-08dc00943102 X-MS-Exchange-CrossTenant-AuthSource: MW3PR11MB4714.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 13:12:48.1282 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3/4tdNRXjMJXVuzdTNliV5WliRg3oaDxAAEJAIbVwCc5qrw2XBeOf14V1mV7WzuOy4+pM4pQmvJfvYhMau8GeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7074 Content-Type: text/plain; charset="utf-8" From: Mathis Marion 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. Signed-off-by: Mathis Marion --- .../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(-) diff --git a/Documentation/driver-api/surface_aggregator/ssh.rst b/Document= ation/driver-api/surface_aggregator/ssh.rst index b955b673838b..58a757319931 100644 --- a/Documentation/driver-api/surface_aggregator/ssh.rst +++ b/Documentation/driver-api/surface_aggregator/ssh.rst @@ -39,7 +39,7 @@ Note that the standard disclaimer for this subsystem also= applies to this document: All of this has been reverse-engineered and may thus be erroneous and/or incomplete. =20 -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 betw= een values. =20 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 90ce58fd629e..925c19ee513b 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -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. diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c index da50eba10014..f62422740de2 100644 --- a/drivers/mfd/rave-sp.c +++ b/drivers/mfd/rave-sp.c @@ -9,7 +9,7 @@ */ =20 #include -#include +#include #include #include #include @@ -251,7 +251,7 @@ static void csum_8b2c(const u8 *buf, size_t size, u8 *c= rc) =20 static void csum_ccitt(const u8 *buf, size_t size, u8 *crc) { - const u16 calculated =3D crc_ccitt_false(0xffff, buf, size); + const u16 calculated =3D crc_itu_t(0xffff, buf, size); =20 /* * While the rest of the wire protocol is little-endian, diff --git a/drivers/platform/surface/aggregator/Kconfig b/drivers/platform= /surface/aggregator/Kconfig index 88afc38ffdc5..957c216c180c 100644 --- a/drivers/platform/surface/aggregator/Kconfig +++ b/drivers/platform/surface/aggregator/Kconfig @@ -5,7 +5,7 @@ menuconfig SURFACE_AGGREGATOR tristate "Microsoft Surface System Aggregator Module Subsystem and Driver= s" 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 diff --git a/include/linux/crc-ccitt.h b/include/linux/crc-ccitt.h index 72c92c396bb8..cd4f420231ba 100644 --- a/include/linux/crc-ccitt.h +++ b/include/linux/crc-ccitt.h @@ -5,19 +5,12 @@ #include =20 extern u16 const crc_ccitt_table[256]; -extern u16 const crc_ccitt_false_table[256]; =20 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); =20 static inline u16 crc_ccitt_byte(u16 crc, const u8 c) { return (crc >> 8) ^ crc_ccitt_table[(crc ^ c) & 0xff]; } =20 -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 */ diff --git a/include/linux/surface_aggregator/serial_hub.h b/include/linux/= surface_aggregator/serial_hub.h index 5c4ae1a26183..d8dbef6b7fc2 100644 --- a/include/linux/surface_aggregator/serial_hub.h +++ b/include/linux/surface_aggregator/serial_hub.h @@ -12,7 +12,7 @@ #ifndef _LINUX_SURFACE_AGGREGATOR_SERIAL_HUB_H #define _LINUX_SURFACE_AGGREGATOR_SERIAL_HUB_H =20 -#include +#include #include #include #include @@ -188,7 +188,7 @@ static_assert(sizeof(struct ssh_command) =3D=3D 8); */ 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); } =20 /* diff --git a/lib/crc-ccitt.c b/lib/crc-ccitt.c index d1a7d29d2ac9..9cddf35d3b66 100644 --- a/lib/crc-ccitt.c +++ b/lib/crc-ccitt.c @@ -49,46 +49,6 @@ u16 const crc_ccitt_table[256] =3D { }; EXPORT_SYMBOL(crc_ccitt_table); =20 -/* - * Similar table to calculate CRC16 variant known as CRC-CCITT-FALSE - * Reflected bits order, does not augment final value. - */ -u16 const crc_ccitt_false_table[256] =3D { - 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, - 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, - 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, - 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, - 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, - 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, - 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, - 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, - 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, - 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, - 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, - 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, - 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, - 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, - 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, - 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, - 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, - 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, - 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, - 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, - 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, - 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, - 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, - 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, - 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, - 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, - 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, - 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, - 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, - 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, - 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, - 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 -}; -EXPORT_SYMBOL(crc_ccitt_false_table); - /** * crc_ccitt - recompute the CRC (CRC-CCITT variant) for the data * buffer @@ -104,20 +64,5 @@ u16 crc_ccitt(u16 crc, u8 const *buffer, size_t len) } EXPORT_SYMBOL(crc_ccitt); =20 -/** - * crc_ccitt_false - recompute the CRC (CRC-CCITT-FALSE variant) - * for the data buffer - * @crc: previous CRC value - * @buffer: data pointer - * @len: number of bytes in the buffer - */ -u16 crc_ccitt_false(u16 crc, u8 const *buffer, size_t len) -{ - while (len--) - crc =3D crc_ccitt_false_byte(crc, *buffer++); - return crc; -} -EXPORT_SYMBOL(crc_ccitt_false); - MODULE_DESCRIPTION("CRC-CCITT calculations"); MODULE_LICENSE("GPL"); --=20 2.43.0