All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] [PATCH] C99 cleanup in kernel/sysctl.c
@ 2003-10-25 15:51 ` Art Haas
  0 siblings, 0 replies; 5+ messages in thread
From: Art Haas @ 2003-10-25 15:51 UTC (permalink / raw)
  To: parisc-linux, Matthew Wilcox, Grant Grundler; +Cc: linux-kernel

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 =====
--- 1.55/kernel/sysctl.c	Thu Oct  2 02:12:07 2003
+++ edited/kernel/sysctl.c	Sat Oct 25 10:45:03 2003
@@ -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)
 	{
-- 
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

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

* [PATCH] C99 cleanup in kernel/sysctl.c
@ 2003-10-25 15:51 ` Art Haas
  0 siblings, 0 replies; 5+ messages in thread
From: Art Haas @ 2003-10-25 15:51 UTC (permalink / raw)
  To: parisc-linux, Matthew Wilcox, Grant Grundler; +Cc: linux-kernel

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 =====
--- 1.55/kernel/sysctl.c	Thu Oct  2 02:12:07 2003
+++ edited/kernel/sysctl.c	Sat Oct 25 10:45:03 2003
@@ -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)
 	{
-- 
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

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

* Re: [parisc-linux] [PATCH] C99 cleanup in kernel/sysctl.c
  2003-10-25 15:51 ` Art Haas
  (?)
@ 2003-10-25 16:01 ` Randolph Chung
  -1 siblings, 0 replies; 5+ messages in thread
From: Randolph Chung @ 2003-10-25 16:01 UTC (permalink / raw)
  To: Art Haas; +Cc: parisc-linux, Matthew Wilcox, Grant Grundler, linux-kernel

> 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
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

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

* Re: [parisc-linux] [PATCH] C99 cleanup in kernel/sysctl.c
  2003-10-25 15:51 ` Art Haas
  (?)
  (?)
@ 2003-10-25 16:01 ` Randolph Chung
  -1 siblings, 0 replies; 5+ messages in thread
From: Randolph Chung @ 2003-10-25 16:01 UTC (permalink / raw)
  To: Art Haas; +Cc: parisc-linux, Matthew Wilcox, Grant Grundler, linux-kernel

> 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
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

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

* [parisc-linux] [PATCH] C99 cleanup in kernel/sysctl.c
@ 2003-10-25 15:51 Art Haas
  0 siblings, 0 replies; 5+ messages in thread
From: Art Haas @ 2003-10-25 15:51 UTC (permalink / raw)
  To: parisc-linux, Matthew Wilcox, Grant Grundler; +Cc: linux-kernel

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 =====
--- 1.55/kernel/sysctl.c	Thu Oct  2 02:12:07 2003
+++ edited/kernel/sysctl.c	Sat Oct 25 10:45:03 2003
@@ -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)
 	{
-- 
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

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

end of thread, other threads:[~2003-10-25 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-25 15:51 [parisc-linux] [PATCH] C99 cleanup in kernel/sysctl.c Art Haas
2003-10-25 15:51 ` Art Haas
2003-10-25 16:01 ` [parisc-linux] " Randolph Chung
2003-10-25 16:01 ` Randolph Chung
  -- strict thread matches above, loose matches on Subject: below --
2003-10-25 15:51 Art Haas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.