git: d7e7397c2171 - main - LinuxKPI: Add crc16.h for amdkfd support

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 05 Oct 2026 12:12:32 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=d7e7397c217137c9f2465f60a7faf129c87934ec

commit d7e7397c217137c9f2465f60a7faf129c87934ec
Author:     Sourojeet A <siri@racha.ca>
AuthorDate: 2026-10-05 12:10:41 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-10-05 12:12:09 +0000

    LinuxKPI: Add crc16.h for amdkfd support
    
    Reviewed by:    wulf
    Differential Revision:  https://reviews.freebsd.org/D60275
---
 sys/compat/linuxkpi/common/include/linux/crc16.h | 13 +++++++++++++
 sys/sys/crc16.h                                  |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/crc16.h b/sys/compat/linuxkpi/common/include/linux/crc16.h
new file mode 100644
index 000000000000..a44f05160f84
--- /dev/null
+++ b/sys/compat/linuxkpi/common/include/linux/crc16.h
@@ -0,0 +1,13 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2026 The FreeBSD Foundation
+ */
+
+#ifndef _LINUXKPI_LINUX_CRC16_H_
+#define _LINUXKPI_LINUX_CRC16_H_
+
+#include <linux/types.h>
+#include <sys/crc16.h>
+
+#endif /* _LINUXKPI_LINUX_CRC16_H_ */
diff --git a/sys/sys/crc16.h b/sys/sys/crc16.h
index 38f1e8220c41..145a10c9041f 100644
--- a/sys/sys/crc16.h
+++ b/sys/sys/crc16.h
@@ -34,7 +34,7 @@
 extern uint16_t const crc16_table[256];
 
 static inline uint16_t
-crc16(uint16_t crc, const void *buffer, unsigned int len)
+crc16(uint16_t crc, const void *buffer, size_t len)
 {
 	const unsigned char *cp = buffer;
 	while (len--)