Skip to contentSkip to conversation

C99 cleanup in kernel/sysctl.c

PATCH In review Art Haas 2 participants 3 messages Oct 25, 2003 Proc sysctl

lore
Share & tools
lore

Art Haas

author
#0 lore raw

PATCH 1/1 C99 cleanup in kernel/sysctl.c

Hi.

Looking at the file kernel/sysctl.c I saw this HP-PA specfic block of code. Here's an untested patch to format the code with C99 named initializers.

Art Haas

===== kernel/sysctl.c 1.55 vs edited =====

kernel/sysctl.c +16 -4
@@ -336,10 +336,22 @@
 	},
 #endif
 #ifdef __hppa__
-	{KERN_HPPA_PWRSW, "soft-power", &pwrsw_enabled, sizeof (int),
-	 0644, NULL, &proc_dointvec},
-	{KERN_HPPA_UNALIGNED, "unaligned-trap", &unaligned_enabled, sizeof (int),
-	 0644, NULL, &proc_dointvec},
+	{
+		.ctl_name	= KERN_HPPA_PWRSW,
+		.procname	= "soft-power",
+		.data		= &pwrsw_enabled,
+		.maxlen		= sizeof (int),
+	 	.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
+		.ctl_name	= KERN_HPPA_UNALIGNED,
+		.procname	= "unaligned-trap",
+		.data		= &unaligned_enabled,
+		.maxlen		= sizeof (int),
+		.mode		= 0644,
+		.proc_handler	= &proc_dointvec,
+	},
 #endif
 #if defined(CONFIG_PPC32) && defined(CONFIG_6xx)
 	{
Signature · 4 lines
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822
#1 lore raw
Quoted 3 lines

Looking at the file kernel/sysctl.c I saw this HP-PA specfic block of code. Here's an untested patch to format the code with C99 named initializers.

hm.. this is already in our 2.6 tree, except the old version was there also, so we have two copies of the same sysctl.. oops :)

i've removed the redundant ones.

thanks
randolph

Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
#2 lore raw
In reply to Art Haas
Quoted 3 lines

Looking at the file kernel/sysctl.c I saw this HP-PA specfic block of code. Here's an untested patch to format the code with C99 named initializers.

hm.. this is already in our 2.6 tree, except the old version was there also, so we have two copies of the same sysctl.. oops :)

i've removed the redundant ones.

thanks
randolph

Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/