public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 02/04 v2] sysctl: change to use proc_dointvec_bool while needed
@ 2011-03-04 15:46 Dave Young
  2011-03-07 23:05 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Young @ 2011-03-04 15:46 UTC (permalink / raw)
  To: Andrew Morton, Ingo Molnar, David Miller, Don Zickus,
	linux-kernel

change only 0 and 1 valid sysctl case to use proc_do_intvec_bool handler

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
 kernel/sysctl.c |   32 ++++++++------------------------
 1 file changed, 8 insertions(+), 24 deletions(-)

--- linux-2.6.orig/kernel/sysctl.c	2011-03-04 23:05:29.000000000 +0800
+++ linux-2.6/kernel/sysctl.c	2011-03-04 23:16:34.083637541 +0800
@@ -342,9 +342,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
 	{
@@ -374,9 +372,7 @@ static struct ctl_table kern_table[] = {
 		.data		= &sysctl_sched_autogroup_enabled,
 		.maxlen		= sizeof(unsigned int),
 		.mode		= 0644,
-		.proc_handler	= proc_dointvec,
-		.extra1		= &zero,
-		.extra2		= &one,
+		.proc_handler	= proc_dointvec_bool,
 	},
 #endif
 #ifdef CONFIG_PROVE_LOCKING
@@ -704,9 +700,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",
@@ -747,9 +741,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",
@@ -861,9 +853,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",
@@ -1297,9 +1287,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
 	{
@@ -1315,18 +1303,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
 	{ }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 02/04 v2] sysctl: change to use proc_dointvec_bool while needed
  2011-03-04 15:46 [PATCH 02/04 v2] sysctl: change to use proc_dointvec_bool while needed Dave Young
@ 2011-03-07 23:05 ` Andrew Morton
  2011-03-08  5:15   ` Dave Young
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2011-03-07 23:05 UTC (permalink / raw)
  To: Dave Young; +Cc: Ingo Molnar, David Miller, Don Zickus, linux-kernel

On Fri, 4 Mar 2011 23:46:31 +0800
Dave Young <hidave.darkstar@gmail.com> wrote:

> @@ -374,9 +372,7 @@ static struct ctl_table kern_table[] = {
>  		.data		= &sysctl_sched_autogroup_enabled,
>  		.maxlen		= sizeof(unsigned int),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> -		.extra1		= &zero,
> -		.extra2		= &one,
> +		.proc_handler	= proc_dointvec_bool,
>  	},

This field has changed in linux-next, so I dropped this hunk.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 02/04 v2] sysctl: change to use proc_dointvec_bool while needed
  2011-03-07 23:05 ` Andrew Morton
@ 2011-03-08  5:15   ` Dave Young
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Young @ 2011-03-08  5:15 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, David Miller, Don Zickus, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 950 bytes --]

On Tue, Mar 8, 2011 at 7:05 AM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 4 Mar 2011 23:46:31 +0800
> Dave Young <hidave.darkstar@gmail.com> wrote:
>
>> @@ -374,9 +372,7 @@ static struct ctl_table kern_table[] = {
>>               .data           = &sysctl_sched_autogroup_enabled,
>>               .maxlen         = sizeof(unsigned int),
>>               .mode           = 0644,
>> -             .proc_handler   = proc_dointvec,
>> -             .extra1         = &zero,
>> -             .extra2         = &one,
>> +             .proc_handler   = proc_dointvec_bool,
>>       },
>
> This field has changed in linux-next, so I dropped this hunk.
>

Thank you for updating the patch.

-- 
Regards
dave
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-08  5:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-04 15:46 [PATCH 02/04 v2] sysctl: change to use proc_dointvec_bool while needed Dave Young
2011-03-07 23:05 ` Andrew Morton
2011-03-08  5:15   ` Dave Young

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox