mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
[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>
This commit is contained in:
parent
cb799b8988
commit
100bb9349e
@ -667,7 +667,6 @@ void create_seq_entry(char *name, mode_t mode, const struct file_operations *f)
|
|||||||
|
|
||||||
void __init proc_misc_init(void)
|
void __init proc_misc_init(void)
|
||||||
{
|
{
|
||||||
struct proc_dir_entry *entry;
|
|
||||||
static struct {
|
static struct {
|
||||||
char *name;
|
char *name;
|
||||||
int (*read_proc)(char*,char**,off_t,int,int*,void*);
|
int (*read_proc)(char*,char**,off_t,int,int*,void*);
|
||||||
@ -695,9 +694,12 @@ void __init proc_misc_init(void)
|
|||||||
|
|
||||||
/* And now for trickier ones */
|
/* And now for trickier ones */
|
||||||
#ifdef CONFIG_PRINTK
|
#ifdef CONFIG_PRINTK
|
||||||
|
{
|
||||||
|
struct proc_dir_entry *entry;
|
||||||
entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
|
entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
|
||||||
if (entry)
|
if (entry)
|
||||||
entry->proc_fops = &proc_kmsg_operations;
|
entry->proc_fops = &proc_kmsg_operations;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
create_seq_entry("devices", 0, &proc_devinfo_operations);
|
create_seq_entry("devices", 0, &proc_devinfo_operations);
|
||||||
create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
|
create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
|
||||||
@ -738,8 +740,11 @@ void __init proc_misc_init(void)
|
|||||||
proc_vmcore->proc_fops = &proc_vmcore_operations;
|
proc_vmcore->proc_fops = &proc_vmcore_operations;
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MAGIC_SYSRQ
|
#ifdef CONFIG_MAGIC_SYSRQ
|
||||||
|
{
|
||||||
|
struct proc_dir_entry *entry;
|
||||||
entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
|
entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
|
||||||
if (entry)
|
if (entry)
|
||||||
entry->proc_fops = &proc_sysrq_trigger_operations;
|
entry->proc_fops = &proc_sysrq_trigger_operations;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user