Skip to content

Commit 9769696

Browse files
robnbehlendorf
authored andcommitted
tunables: remove unused param get/set aliases
Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Pavel Snajdr <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes openzfs#17377
1 parent 06fd6dc commit 9769696

File tree

1 file changed

+15
-35
lines changed

1 file changed

+15
-35
lines changed

include/os/linux/kernel/linux/mod_compat.h

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -79,43 +79,23 @@ enum scope_prefix_types {
7979
};
8080

8181
/*
82-
* While we define our own u64 types, there is no reason to reimplement the
83-
* existing Linux kernel types, so we use the preprocessor to remap our
84-
* "custom" implementations to the kernel ones. This is done because the CPP
85-
* does not allow us to write conditional definitions. The fourth definition
86-
* exists because the CPP will not allow us to replace things like INT with int
87-
* before string concatenation.
82+
* Our uint64 params are called U64 in part because we had them before Linux
83+
* provided ULLONG param ops. Now it does, and we use them, but we retain the
84+
* U64 name to keep many existing tunables working without issue.
8885
*/
86+
#define spl_param_set_u64 param_set_ullong
87+
#define spl_param_get_u64 param_get_ullong
88+
#define spl_param_ops_U64 param_ops_ullong
8989

90-
#define spl_param_set_int param_set_int
91-
#define spl_param_get_int param_get_int
92-
#define spl_param_ops_int param_ops_int
93-
#define spl_param_ops_INT param_ops_int
94-
95-
#define spl_param_set_long param_set_long
96-
#define spl_param_get_long param_get_long
97-
#define spl_param_ops_long param_ops_long
98-
#define spl_param_ops_LONG param_ops_long
99-
100-
#define spl_param_set_uint param_set_uint
101-
#define spl_param_get_uint param_get_uint
102-
#define spl_param_ops_uint param_ops_uint
103-
#define spl_param_ops_UINT param_ops_uint
104-
105-
#define spl_param_set_ulong param_set_ulong
106-
#define spl_param_get_ulong param_get_ulong
107-
#define spl_param_ops_ulong param_ops_ulong
108-
#define spl_param_ops_ULONG param_ops_ulong
109-
110-
#define spl_param_set_u64 param_set_ullong
111-
#define spl_param_get_u64 param_get_ullong
112-
#define spl_param_ops_u64 param_ops_ullong
113-
#define spl_param_ops_U64 param_ops_ullong
114-
115-
#define spl_param_set_charp param_set_charp
116-
#define spl_param_get_charp param_get_charp
117-
#define spl_param_ops_charp param_ops_charp
118-
#define spl_param_ops_STRING param_ops_charp
90+
/*
91+
* We keep our own names for param ops to make expanding them in
92+
* ZFS_MODULE_PARAM easy.
93+
*/
94+
#define spl_param_ops_INT param_ops_int
95+
#define spl_param_ops_LONG param_ops_long
96+
#define spl_param_ops_UINT param_ops_uint
97+
#define spl_param_ops_ULONG param_ops_ulong
98+
#define spl_param_ops_STRING param_ops_charp
11999

120100
/*
121101
* Declare a module parameter / sysctl node

0 commit comments

Comments
 (0)