Skip to contentSkip to conversation

small proc_fs cleanups

PATCH New Adrian Bunk 1 participant 1 message Oct 30, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

diffstat output:

 fs/proc/kcore.c         |   17 -----------------
 fs/proc/proc_misc.c     |    4 ++--
 include/linux/proc_fs.h |    5 -----
 3 files changed, 2 insertions(+), 24 deletions(-)
include/linux/proc_fs.h renamed from include/linux/proc_fs.h.old +0 -5
@@ -231,13 +231,8 @@
 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
 extern void kclist_add(struct kcore_list *, void *, size_t);
-extern struct kcore_list *kclist_del(void *);
 #endif
 
 struct proc_inode {
fs/proc/kcore.c renamed from fs/proc/kcore.c.old +0 -17
@@ -68,23 +68,6 @@
 	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)
 {
 	size_t try, size;
fs/proc/proc_misc.c renamed from fs/proc/proc_misc.c.old +2 -2
@@ -359,7 +359,7 @@
 	.release	= seq_release,
 };
 
-int show_stat(struct seq_file *p, void *v)
+static int show_stat(struct seq_file *p, void *v)
 {
 	int i;
 	extern unsigned long total_forks;
@@ -509,7 +509,7 @@
 	.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);
 }