* [2.6 patch] mm/shmem.c: make 3 functions static
@ 2007-07-05 23:23 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2007-07-05 23:23 UTC (permalink / raw)
To: linux-kernel
This patch makes three needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
include/linux/mm.h | 15 ---------------
mm/shmem.c | 10 +++++-----
2 files changed, 5 insertions(+), 20 deletions(-)
--- linux-2.6.22-rc6-mm1/include/linux/mm.h.old 2007-07-05 17:03:26.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/mm.h 2007-07-05 17:03:45.000000000 +0200
@@ -707,9 +707,6 @@
extern void show_free_areas(void);
#ifdef CONFIG_SHMEM
-int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
-struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
- unsigned long addr);
int shmem_lock(struct file *file, int lock, struct user_struct *user);
#else
static inline int shmem_lock(struct file *file, int lock,
@@ -717,18 +714,6 @@
{
return 0;
}
-
-static inline int shmem_set_policy(struct vm_area_struct *vma,
- struct mempolicy *new)
-{
- return 0;
-}
-
-static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
- unsigned long addr)
-{
- return NULL;
-}
#endif
struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
--- linux-2.6.22-rc6-mm1/mm/shmem.c.old 2007-07-05 17:04:00.000000000 +0200
+++ linux-2.6.22-rc6-mm1/mm/shmem.c 2007-07-05 17:06:27.000000000 +0200
@@ -1025,8 +1025,8 @@
return page;
}
-struct page *shmem_swapin(struct shmem_inode_info *info, swp_entry_t entry,
- unsigned long idx)
+static struct page *shmem_swapin(struct shmem_inode_info *info,
+ swp_entry_t entry, unsigned long idx)
{
struct shared_policy *p = &info->policy;
int i, num;
@@ -1335,14 +1335,14 @@
}
#ifdef CONFIG_NUMA
-int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
+static int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
{
struct inode *i = vma->vm_file->f_path.dentry->d_inode;
return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new);
}
-struct mempolicy *
-shmem_get_policy(struct vm_area_struct *vma, unsigned long addr)
+static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
+ unsigned long addr)
{
struct inode *i = vma->vm_file->f_path.dentry->d_inode;
unsigned long idx;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [2.6 patch] mm/shmem.c: make 3 functions static
@ 2007-07-29 15:03 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2007-07-29 15:03 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
This patch makes three needlessly global functions static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch has been sent on:
- 6 Jul 2007
include/linux/mm.h | 15 ---------------
mm/shmem.c | 10 +++++-----
2 files changed, 5 insertions(+), 20 deletions(-)
--- linux-2.6.22-rc6-mm1/include/linux/mm.h.old 2007-07-05 17:03:26.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/mm.h 2007-07-05 17:03:45.000000000 +0200
@@ -707,9 +707,6 @@
extern void show_free_areas(void);
#ifdef CONFIG_SHMEM
-int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
-struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
- unsigned long addr);
int shmem_lock(struct file *file, int lock, struct user_struct *user);
#else
static inline int shmem_lock(struct file *file, int lock,
@@ -717,18 +714,6 @@
{
return 0;
}
-
-static inline int shmem_set_policy(struct vm_area_struct *vma,
- struct mempolicy *new)
-{
- return 0;
-}
-
-static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
- unsigned long addr)
-{
- return NULL;
-}
#endif
struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
--- linux-2.6.22-rc6-mm1/mm/shmem.c.old 2007-07-05 17:04:00.000000000 +0200
+++ linux-2.6.22-rc6-mm1/mm/shmem.c 2007-07-05 17:06:27.000000000 +0200
@@ -1025,8 +1025,8 @@
return page;
}
-struct page *shmem_swapin(struct shmem_inode_info *info, swp_entry_t entry,
- unsigned long idx)
+static struct page *shmem_swapin(struct shmem_inode_info *info,
+ swp_entry_t entry, unsigned long idx)
{
struct shared_policy *p = &info->policy;
int i, num;
@@ -1335,14 +1335,14 @@
}
#ifdef CONFIG_NUMA
-int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
+static int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
{
struct inode *i = vma->vm_file->f_path.dentry->d_inode;
return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new);
}
-struct mempolicy *
-shmem_get_policy(struct vm_area_struct *vma, unsigned long addr)
+static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
+ unsigned long addr)
{
struct inode *i = vma->vm_file->f_path.dentry->d_inode;
unsigned long idx;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-29 15:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-29 15:03 [2.6 patch] mm/shmem.c: make 3 functions static Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2007-07-05 23:23 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox