From ac3821b37542c274103f2b4c7fcbd3c435f0cc0d Mon Sep 17 00:00:00 2001 From: Dave Young Date: Wed, 3 Aug 2011 10:53:03 +1000 Subject: [PATCH] Use the new proc_do_intvec_bool() handler for various boolean inputs. Signed-off-by: Dave Young Cc: Alexey Dobriyan Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton --- kernel/sysctl.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 6c9414640f7c..b09b6be2ab19 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -349,9 +349,7 @@ static struct ctl_table kern_table[] = { .data = &sysctl_timer_migration, .maxlen = sizeof(unsigned int), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, #endif { @@ -709,9 +707,7 @@ static struct ctl_table kern_table[] = { .data = &dmesg_restrict, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, { .procname = "kptr_restrict", @@ -754,9 +750,7 @@ static struct ctl_table kern_table[] = { .data = &softlockup_panic, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, { .procname = "nmi_watchdog", @@ -870,9 +864,7 @@ static struct ctl_table kern_table[] = { .data = &sysctl_hung_task_panic, .maxlen = sizeof(int), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, { .procname = "hung_task_check_count", @@ -1320,9 +1312,7 @@ static struct ctl_table vm_table[] = { .data = &vm_highmem_is_dirtyable, .maxlen = sizeof(vm_highmem_is_dirtyable), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, #endif { @@ -1338,18 +1328,14 @@ static struct ctl_table vm_table[] = { .data = &sysctl_memory_failure_early_kill, .maxlen = sizeof(sysctl_memory_failure_early_kill), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, { .procname = "memory_failure_recovery", .data = &sysctl_memory_failure_recovery, .maxlen = sizeof(sysctl_memory_failure_recovery), .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = &zero, - .extra2 = &one, + .proc_handler = proc_dointvec_bool, }, #endif { } -- 2.39.2