Commit 6a4c2643 authored by Jani Nikula's avatar Jani Nikula Committed by Rusty Russell

module: rename KERNEL_PARAM_FL_NOARG to avoid confusion

Make it clear this is about kernel_param_ops, not kernel_param (which
will soon have a flags field of its own). No functional changes.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Jon Mason <jon.mason@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 68e37028
...@@ -42,7 +42,7 @@ struct kernel_param; ...@@ -42,7 +42,7 @@ struct kernel_param;
* NOARG - the parameter allows for no argument (foo instead of foo=1) * NOARG - the parameter allows for no argument (foo instead of foo=1)
*/ */
enum { enum {
KERNEL_PARAM_FL_NOARG = (1 << 0) KERNEL_PARAM_OPS_FL_NOARG = (1 << 0)
}; };
struct kernel_param_ops { struct kernel_param_ops {
......
...@@ -135,7 +135,7 @@ static int param_set_bool_enable_only(const char *val, ...@@ -135,7 +135,7 @@ static int param_set_bool_enable_only(const char *val,
} }
static const struct kernel_param_ops param_ops_bool_enable_only = { static const struct kernel_param_ops param_ops_bool_enable_only = {
.flags = KERNEL_PARAM_FL_NOARG, .flags = KERNEL_PARAM_OPS_FL_NOARG,
.set = param_set_bool_enable_only, .set = param_set_bool_enable_only,
.get = param_get_bool, .get = param_get_bool,
}; };
......
...@@ -104,7 +104,7 @@ static int parse_one(char *param, ...@@ -104,7 +104,7 @@ static int parse_one(char *param,
return 0; return 0;
/* No one handled NULL, so do it here. */ /* No one handled NULL, so do it here. */
if (!val && if (!val &&
!(params[i].ops->flags & KERNEL_PARAM_FL_NOARG)) !(params[i].ops->flags & KERNEL_PARAM_OPS_FL_NOARG))
return -EINVAL; return -EINVAL;
pr_debug("handling %s with %p\n", param, pr_debug("handling %s with %p\n", param,
params[i].ops->set); params[i].ops->set);
...@@ -318,7 +318,7 @@ int param_get_bool(char *buffer, const struct kernel_param *kp) ...@@ -318,7 +318,7 @@ int param_get_bool(char *buffer, const struct kernel_param *kp)
EXPORT_SYMBOL(param_get_bool); EXPORT_SYMBOL(param_get_bool);
struct kernel_param_ops param_ops_bool = { struct kernel_param_ops param_ops_bool = {
.flags = KERNEL_PARAM_FL_NOARG, .flags = KERNEL_PARAM_OPS_FL_NOARG,
.set = param_set_bool, .set = param_set_bool,
.get = param_get_bool, .get = param_get_bool,
}; };
...@@ -369,7 +369,7 @@ int param_set_bint(const char *val, const struct kernel_param *kp) ...@@ -369,7 +369,7 @@ int param_set_bint(const char *val, const struct kernel_param *kp)
EXPORT_SYMBOL(param_set_bint); EXPORT_SYMBOL(param_set_bint);
struct kernel_param_ops param_ops_bint = { struct kernel_param_ops param_ops_bint = {
.flags = KERNEL_PARAM_FL_NOARG, .flags = KERNEL_PARAM_OPS_FL_NOARG,
.set = param_set_bint, .set = param_set_bint,
.get = param_get_int, .get = param_get_int,
}; };
......
...@@ -668,7 +668,7 @@ static int param_set_aabool(const char *val, const struct kernel_param *kp); ...@@ -668,7 +668,7 @@ static int param_set_aabool(const char *val, const struct kernel_param *kp);
static int param_get_aabool(char *buffer, const struct kernel_param *kp); static int param_get_aabool(char *buffer, const struct kernel_param *kp);
#define param_check_aabool param_check_bool #define param_check_aabool param_check_bool
static struct kernel_param_ops param_ops_aabool = { static struct kernel_param_ops param_ops_aabool = {
.flags = KERNEL_PARAM_FL_NOARG, .flags = KERNEL_PARAM_OPS_FL_NOARG,
.set = param_set_aabool, .set = param_set_aabool,
.get = param_get_aabool .get = param_get_aabool
}; };
...@@ -685,7 +685,7 @@ static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp ...@@ -685,7 +685,7 @@ static int param_set_aalockpolicy(const char *val, const struct kernel_param *kp
static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp); static int param_get_aalockpolicy(char *buffer, const struct kernel_param *kp);
#define param_check_aalockpolicy param_check_bool #define param_check_aalockpolicy param_check_bool
static struct kernel_param_ops param_ops_aalockpolicy = { static struct kernel_param_ops param_ops_aalockpolicy = {
.flags = KERNEL_PARAM_FL_NOARG, .flags = KERNEL_PARAM_OPS_FL_NOARG,
.set = param_set_aalockpolicy, .set = param_set_aalockpolicy,
.get = param_get_aalockpolicy .get = param_get_aalockpolicy
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment