aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2007-02-10 04:45:51 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:31 -0500
commit100bb9349ea5cb4e667977de55bd6dc4ac7bc22f (patch)
treed5b4e61daf0c35d745846818bb89b6b7b9d2f283 /fs/proc
parentcb799b8988e40a7871ae8e976248c33c562e3555 (diff)
[PATCH] proc_misc warning fix
fs/proc/proc_misc.c: In function 'proc_misc_init': fs/proc/proc_misc.c:764: warning: unused variable 'entry' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/proc_misc.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 1d5b4fb2c72..5e2d4359c29 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -667,7 +667,6 @@ void create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
667 667
668void __init proc_misc_init(void) 668void __init proc_misc_init(void)
669{ 669{
670 struct proc_dir_entry *entry;
671 static struct { 670 static struct {
672 char *name; 671 char *name;
673 int (*read_proc)(char*,char**,off_t,int,int*,void*); 672 int (*read_proc)(char*,char**,off_t,int,int*,void*);
@@ -695,9 +694,12 @@ void __init proc_misc_init(void)
695 694
696 /* And now for trickier ones */ 695 /* And now for trickier ones */
697#ifdef CONFIG_PRINTK 696#ifdef CONFIG_PRINTK
698 entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); 697 {
699 if (entry) 698 struct proc_dir_entry *entry;
700 entry->proc_fops = &proc_kmsg_operations; 699 entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
700 if (entry)
701 entry->proc_fops = &proc_kmsg_operations;
702 }
701#endif 703#endif
702 create_seq_entry("devices", 0, &proc_devinfo_operations); 704 create_seq_entry("devices", 0, &proc_devinfo_operations);
703 create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); 705 create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
@@ -738,8 +740,11 @@ void __init proc_misc_init(void)
738 proc_vmcore->proc_fops = &proc_vmcore_operations; 740 proc_vmcore->proc_fops = &proc_vmcore_operations;
739#endif 741#endif
740#ifdef CONFIG_MAGIC_SYSRQ 742#ifdef CONFIG_MAGIC_SYSRQ
741 entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL); 743 {
742 if (entry) 744 struct proc_dir_entry *entry;
743 entry->proc_fops = &proc_sysrq_trigger_operations; 745 entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
746 if (entry)
747 entry->proc_fops = &proc_sysrq_trigger_operations;
748 }
744#endif 749#endif
745} 750}