git: a1a8fe776916 - stable/13 - linuxkpi: Introduce module_param() of type `bint`

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Tue, 24 Jan 2023 08:54:13 UTC
The branch stable/13 has been updated by manu:

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

commit a1a8fe77691694ebc55c0d940300badb48554a03
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2022-12-01 14:03:00 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-01-24 09:08:01 +0000

    linuxkpi: Introduce module_param() of type `bint`
    
    In Linux, this limits the accepted value to -1, 0 and 1.
    In FreeBSD, this remains a signed integer with no specific constraints.
    
    This change is a requirement to update our DRM drivers to Linux 5.12.
    
    Differential Revision:  https://reviews.freebsd.org/D37364
    
    (cherry picked from commit e101c1c2c9ba18b1dd0eb2000106fafc915babdc)
---
 sys/compat/linuxkpi/common/include/linux/moduleparam.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/moduleparam.h b/sys/compat/linuxkpi/common/include/linux/moduleparam.h
index ebf3b7a95c02..b5c6ef95637c 100644
--- a/sys/compat/linuxkpi/common/include/linux/moduleparam.h
+++ b/sys/compat/linuxkpi/common/include/linux/moduleparam.h
@@ -90,6 +90,9 @@
 	LINUXKPI_PARAM_NAME(name), LINUXKPI_PARAM_PERM(perm), &(var), 0, \
 	LINUXKPI_PARAM_DESC(name)))
 
+#define	LINUXKPI_PARAM_bint(name, var, perm)				\
+	LINUXKPI_PARAM_int(name, var, perm)
+
 #define	LINUXKPI_PARAM_hexint(name, var, perm)				\
 	extern const char LINUXKPI_PARAM_DESC(name)[];			\
 	LINUXKPI_PARAM_PASS(SYSCTL_UINT(LINUXKPI_PARAM_PARENT, OID_AUTO, \