[PATCH] mm: make vread() and vwrite() declaration

From: KOSAKI Motohiro
Date: Mon Nov 24 2008 - 23:31:17 EST


Sparse output following warnings.

mm/vmalloc.c:1436:6: warning: symbol 'vread' was not declared. Should it be static?
mm/vmalloc.c:1474:6: warning: symbol 'vwrite' was not declared. Should it be static?


However, it is used by /dev/kmem. fixed here.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
---
drivers/char/mem.c | 3 ---
include/linux/vmalloc.h | 4 ++++
2 files changed, 4 insertions(+), 3 deletions(-)

Index: b/drivers/char/mem.c
===================================================================
--- a/drivers/char/mem.c 2008-11-05 01:10:59.000000000 +0900
+++ b/drivers/char/mem.c 2008-11-22 22:09:49.000000000 +0900
@@ -425,9 +425,6 @@ static ssize_t read_oldmem(struct file *
}
#endif

-extern long vread(char *buf, char *addr, unsigned long count);
-extern long vwrite(char *buf, char *addr, unsigned long count);
-
#ifdef CONFIG_DEVKMEM
/*
* This function reads the *virtual* memory as seen by the kernel.
Index: b/include/linux/vmalloc.h
===================================================================
--- a/include/linux/vmalloc.h 2008-11-05 01:11:55.000000000 +0900
+++ b/include/linux/vmalloc.h 2008-11-22 22:09:28.000000000 +0900
@@ -97,6 +97,10 @@ extern void unmap_kernel_range(unsigned
extern struct vm_struct *alloc_vm_area(size_t size);
extern void free_vm_area(struct vm_struct *area);

+/* for /dev/kmem */
+extern long vread(char *buf, char *addr, unsigned long count);
+extern long vwrite(char *buf, char *addr, unsigned long count);
+
/*
* Internals. Dont't use..
*/


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/