Skip to contentSkip to conversation

procfs: convert to C99 inits.

PATCH In review Randy.Dunlap 2 participants 3 messages Mar 15, 2005 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 procfs: convert to C99 inits.

(resend)

Use C99 struct inits as requested by sparse:
fs/proc/base.c:738:2: warning: obsolete struct initializer, use C99 syntax fs/proc/base.c:739:2: warning: obsolete struct initializer, use C99 syntax

diffstat:=

 fs/proc/base.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
fs/proc/base.c renamed from fs/proc/base.c~proc_c99_inits +2 -2
diff -Naurp ./fs/proc/base.c~proc_c99_inits ./fs/proc/base.c
@@ -735,8 +735,8 @@ static ssize_t oom_adjust_write(struct f
 }
 
 static struct file_operations proc_oom_adjust_operations = {
-	read:		oom_adjust_read,
-	write:		oom_adjust_write,
+	.read		= oom_adjust_read,
+	.write		= oom_adjust_write,
 };
 
 static struct inode_operations proc_mem_inode_operations = {

---

#1 lore raw
Quoted 5 lines · Randy.Dunlap

(resend)

Use C99 struct inits as requested by sparse:
fs/proc/base.c:738:2: warning: obsolete struct initializer, use C99 syntax fs/proc/base.c:739:2: warning: obsolete struct initializer, use C99 syntax

I posted a patch for this, and an included __user missing from the self-same set of functions a short while ago.

Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
#2 lore raw
Quoted 11 lines · Ben Dooks
Quoted 5 lines · Randy.Dunlap

(resend)

Use C99 struct inits as requested by sparse:
fs/proc/base.c:738:2: warning: obsolete struct initializer, use C99 syntax fs/proc/base.c:739:2: warning: obsolete struct initializer, use C99 syntax

I posted a patch for this, and an included __user missing from the self-same set of functions a short while ago.

Sounds better. I hadn't noticed that part...

Signature · 1 line
~Randy