@@ -47,9 +47,6 @@ struct kernel_param_ops {
4747 void (* free )(void * arg );
4848};
4949
50- /* Flag bits for kernel_param.flags */
51- #define KPARAM_ISBOOL 2
52-
5350struct kernel_param {
5451 const char * name ;
5552 const struct kernel_param_ops * ops ;
@@ -131,8 +128,7 @@ struct kparam_array
131128 * The ops can have NULL set or get functions.
132129 */
133130#define module_param_cb (name , ops , arg , perm ) \
134- __module_param_call(MODULE_PARAM_PREFIX, \
135- name, ops, arg, __same_type((arg), bool *), perm)
131+ __module_param_call(MODULE_PARAM_PREFIX, name, ops, arg, perm)
136132
137133/* On alpha, ia64 and ppc64 relocations to global data cannot go into
138134 read-only sections (which is part of respective UNIX ABI on these
@@ -146,7 +142,7 @@ struct kparam_array
146142
147143/* This is the fundamental function for registering boot/module
148144 parameters. */
149- #define __module_param_call (prefix , name , ops , arg , isbool , perm ) \
145+ #define __module_param_call (prefix , name , ops , arg , perm ) \
150146 /* Default value instead of permissions? */ \
151147 static int __param_perm_check_##name __attribute__((unused)) = \
152148 BUILD_BUG_ON_ZERO((perm) < 0 || (perm) > 0777 || ((perm) & 2)) \
@@ -155,16 +151,14 @@ struct kparam_array
155151 static struct kernel_param __moduleparam_const __param_##name \
156152 __used \
157153 __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
158- = { __param_str_##name, ops, perm, isbool ? KPARAM_ISBOOL : 0, \
159- { arg } }
154+ = { __param_str_##name, ops, perm, 0, { arg } }
160155
161156/* Obsolete - use module_param_cb() */
162157#define module_param_call (name , set , get , arg , perm ) \
163158 static struct kernel_param_ops __param_ops_##name = \
164159 { (void *)set, (void *)get }; \
165160 __module_param_call(MODULE_PARAM_PREFIX, \
166161 name, &__param_ops_##name, arg, \
167- __same_type(arg, bool *), \
168162 (perm) + sizeof(__check_old_set_param(set))*0)
169163
170164/* We don't get oldget: it's often a new-style param_get_uint, etc. */
@@ -245,8 +239,7 @@ static inline void __kernel_param_unlock(void)
245239 */
246240#define core_param (name , var , type , perm ) \
247241 param_check_##type(name, &(var)); \
248- __module_param_call("", name, ¶m_ops_##type, \
249- &var, __same_type(var, bool), perm)
242+ __module_param_call("", name, ¶m_ops_##type, &var, perm)
250243#endif /* !MODULE */
251244
252245/**
@@ -264,7 +257,7 @@ static inline void __kernel_param_unlock(void)
264257 = { len, string }; \
265258 __module_param_call(MODULE_PARAM_PREFIX, name, \
266259 ¶m_ops_string, \
267- .str = &__param_string_##name, 0, perm); \
260+ .str = &__param_string_##name, perm); \
268261 __MODULE_PARM_TYPE(name, "string")
269262
270263/**
@@ -403,7 +396,7 @@ extern int param_set_bint(const char *val, const struct kernel_param *kp);
403396 __module_param_call(MODULE_PARAM_PREFIX, name, \
404397 ¶m_array_ops, \
405398 .arr = &__param_arr_##name, \
406- __same_type(array[0], bool), perm); \
399+ perm); \
407400 __MODULE_PARM_TYPE(name, "array of " #type)
408401
409402extern struct kernel_param_ops param_array_ops ;
0 commit comments