git: e101c1c2c9ba - main - linuxkpi: Introduce module_param() of type `bint`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 Dec 2022 14:04:43 UTC
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=e101c1c2c9ba18b1dd0eb2000106fafc915babdc commit e101c1c2c9ba18b1dd0eb2000106fafc915babdc Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> AuthorDate: 2022-12-01 14:03:00 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2022-12-01 14:03:00 +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 --- 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, \