Skip to contentSkip to conversation

shmem: remove unused shmem_get_unmapped_area

PATCH In review Matt Mackall 3 participants 3 messages Dec 4, 2008 – Dec 5, 2008

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

PATCH 1/1 shmem: remove unused shmem_get_unmapped_area

include/linux/mm.h +0 -8
diff -r b4d73844205b -r 8a9f1e9c46e8 include/linux/mm.h
@@ -717,14 +717,6 @@
 
 int shmem_zero_setup(struct vm_area_struct *);
 
-#ifndef CONFIG_MMU
-extern unsigned long shmem_get_unmapped_area(struct file *file,
-					     unsigned long addr,
-					     unsigned long len,
-					     unsigned long pgoff,
-					     unsigned long flags);
-#endif
-
 extern int can_do_mlock(void);
 extern int user_shm_lock(size_t, struct user_struct *);
 extern void user_shm_unlock(size_t, struct user_struct *);
mm/tiny-shmem.c +0 -11
diff -r b4d73844205b -r 8a9f1e9c46e8 mm/tiny-shmem.c
@@ -121,14 +121,3 @@
 {
 	return 0;
 }
-
-#ifndef CONFIG_MMU
-unsigned long shmem_get_unmapped_area(struct file *file,
-				      unsigned long addr,
-				      unsigned long len,
-				      unsigned long pgoff,
-				      unsigned long flags)
-{
-	return ramfs_nommu_get_unmapped_area(file, addr, len, pgoff, flags);
-}
-#endif
Signature · 1 line
Mathematics is the supreme nostalgia of our time.
Acked-by on v1 1/1
#2 lore raw
In reply to Matt Mackall
Quoted 1 line · Matt Mackall

(Really, ramfs_nommu_get_unmapped_area() should be made static in fs/ramfs/file-nommu.c, and its extern removed from ramfs.h; but I notice it's used before it's declared, and my current record at messing up Andrew with build errors is not very good, so I'd rather leave that to someone who builds with NOMMU.)

Quoted 40 lines

diff -r b4d73844205b -r 8a9f1e9c46e8 include/linux/mm.h

include/linux/mm.h +0 -8
@@ -717,14 +717,6 @@
 
 int shmem_zero_setup(struct vm_area_struct *);
 
-#ifndef CONFIG_MMU
-extern unsigned long shmem_get_unmapped_area(struct file *file,
-					     unsigned long addr,
-					     unsigned long len,
-					     unsigned long pgoff,
-					     unsigned long flags);
-#endif
-
 extern int can_do_mlock(void);
 extern int user_shm_lock(size_t, struct user_struct *);
 extern void user_shm_unlock(size_t, struct user_struct *);

diff -r b4d73844205b -r 8a9f1e9c46e8 mm/tiny-shmem.c

mm/tiny-shmem.c +0 -11
@@ -121,14 +121,3 @@
 {
 	return 0;
 }
-
-#ifndef CONFIG_MMU
-unsigned long shmem_get_unmapped_area(struct file *file,
-				      unsigned long addr,
-				      unsigned long len,
-				      unsigned long pgoff,
-				      unsigned long flags)
-{
-	return ramfs_nommu_get_unmapped_area(file, addr, len, pgoff, flags);
-}
-#endif
Signature · 2 lines
-- 
Mathematics is the supreme nostalgia of our time.