Commit 0b7d79ff authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] small proc_fs cleanups

The patch below does the following cleanups in the proc_fs code:
- remove an unused global function
- make two functions static
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 283b7bfb
...@@ -68,23 +68,6 @@ kclist_add(struct kcore_list *new, void *addr, size_t size) ...@@ -68,23 +68,6 @@ kclist_add(struct kcore_list *new, void *addr, size_t size)
write_unlock(&kclist_lock); write_unlock(&kclist_lock);
} }
struct kcore_list *
kclist_del(void *addr)
{
struct kcore_list *m, **p = &kclist;
write_lock(&kclist_lock);
for (m = *p; m; p = &m->next) {
if (m->addr == (unsigned long)addr) {
*p = m->next;
write_unlock(&kclist_lock);
return m;
}
}
write_unlock(&kclist_lock);
return NULL;
}
static size_t get_kcore_size(int *nphdr, size_t *elf_buflen) static size_t get_kcore_size(int *nphdr, size_t *elf_buflen)
{ {
size_t try, size; size_t try, size;
......
...@@ -318,7 +318,7 @@ static struct file_operations proc_slabinfo_operations = { ...@@ -318,7 +318,7 @@ static struct file_operations proc_slabinfo_operations = {
.release = seq_release, .release = seq_release,
}; };
int show_stat(struct seq_file *p, void *v) static int show_stat(struct seq_file *p, void *v)
{ {
int i; int i;
unsigned long jif; unsigned long jif;
...@@ -461,7 +461,7 @@ static struct seq_operations int_seq_ops = { ...@@ -461,7 +461,7 @@ static struct seq_operations int_seq_ops = {
.show = show_interrupts .show = show_interrupts
}; };
int interrupts_open(struct inode *inode, struct file *filp) static int interrupts_open(struct inode *inode, struct file *filp)
{ {
return seq_open(filp, &int_seq_ops); return seq_open(filp, &int_seq_ops);
} }
......
...@@ -231,13 +231,8 @@ extern struct proc_dir_entry proc_root; ...@@ -231,13 +231,8 @@ extern struct proc_dir_entry proc_root;
static inline void kclist_add(struct kcore_list *new, void *addr, size_t size) static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
{ {
} }
static inline struct kcore_list * kclist_del(void *addr)
{
return NULL;
}
#else #else
extern void kclist_add(struct kcore_list *, void *, size_t); extern void kclist_add(struct kcore_list *, void *, size_t);
extern struct kcore_list *kclist_del(void *);
#endif #endif
struct proc_inode { struct proc_inode {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment