* [2.6 patch] mm/swapfile.c: make code static
@ 2008-05-05 18:27 Adrian Bunk
2008-05-05 20:16 ` KOSAKI Motohiro
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2008-05-05 18:27 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
This patch makes the following needlessly global code static:
- swap_lock
- nr_swapfiles
- struct swap_list
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
This patch has been sent on:
- 22 Apr 2008
- 14 Apr 2008
- 31 Mar 2008
- 25 Feb 2008
include/linux/swap.h | 3 ---
mm/swapfile.c | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
bb7f3cffcbe9023d345ff94dd983292613a8de6b diff --git a/include/linux/swap.h b/include/linux/swap.h
index 878459a..9c9f4e5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
/* linux/mm/swapfile.c */
extern long total_swap_pages;
-extern unsigned int nr_swapfiles;
extern void si_swapinfo(struct sysinfo *);
extern swp_entry_t get_swap_page(void);
extern swp_entry_t get_swap_page_of_type(int);
@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info;
-extern spinlock_t swap_lock;
-
/* linux/mm/thrash.c */
extern struct mm_struct * swap_token_mm;
extern void grab_swap_token(void);
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2da149c..0b20c79 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -33,8 +33,8 @@
#include <asm/tlbflush.h>
#include <linux/swapops.h>
-DEFINE_SPINLOCK(swap_lock);
-unsigned int nr_swapfiles;
+static DEFINE_SPINLOCK(swap_lock);
+static unsigned int nr_swapfiles;
long total_swap_pages;
static int swap_overflow;
@@ -43,7 +43,7 @@ static const char Unused_file[] = "Unused swap file entry ";
static const char Bad_offset[] = "Bad swap offset entry ";
static const char Unused_offset[] = "Unused swap offset entry ";
-struct swap_list_t swap_list = {-1, -1};
+static struct swap_list_t swap_list = {-1, -1};
static struct swap_info_struct swap_info[MAX_SWAPFILES];
^ permalink raw reply [flat|nested] 6+ messages in thread* [2.6 patch] mm/swapfile.c: make code static
@ 2008-04-21 21:32 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-04-21 21:32 UTC (permalink / raw)
To: linux-kernel
This patch makes the following needlessly global code static:
- swap_lock
- nr_swapfiles
- struct swap_list
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
This patch has been sent on:
- 14 Apr 2008
- 31 Mar 2008
- 25 Feb 2008
include/linux/swap.h | 3 ---
mm/swapfile.c | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
bb7f3cffcbe9023d345ff94dd983292613a8de6b diff --git a/include/linux/swap.h b/include/linux/swap.h
index 878459a..9c9f4e5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
/* linux/mm/swapfile.c */
extern long total_swap_pages;
-extern unsigned int nr_swapfiles;
extern void si_swapinfo(struct sysinfo *);
extern swp_entry_t get_swap_page(void);
extern swp_entry_t get_swap_page_of_type(int);
@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info;
-extern spinlock_t swap_lock;
-
/* linux/mm/thrash.c */
extern struct mm_struct * swap_token_mm;
extern void grab_swap_token(void);
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2da149c..0b20c79 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -33,8 +33,8 @@
#include <asm/tlbflush.h>
#include <linux/swapops.h>
-DEFINE_SPINLOCK(swap_lock);
-unsigned int nr_swapfiles;
+static DEFINE_SPINLOCK(swap_lock);
+static unsigned int nr_swapfiles;
long total_swap_pages;
static int swap_overflow;
@@ -43,7 +43,7 @@ static const char Unused_file[] = "Unused swap file entry ";
static const char Bad_offset[] = "Bad swap offset entry ";
static const char Unused_offset[] = "Unused swap offset entry ";
-struct swap_list_t swap_list = {-1, -1};
+static struct swap_list_t swap_list = {-1, -1};
static struct swap_info_struct swap_info[MAX_SWAPFILES];
^ permalink raw reply [flat|nested] 6+ messages in thread* [2.6 patch] mm/swapfile.c: make code static
@ 2008-04-14 18:13 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-04-14 18:13 UTC (permalink / raw)
To: linux-kernel
This patch makes the following needlessly global code static:
- swap_lock
- nr_swapfiles
- struct swap_list
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
This patch has been sent on:
- 31 Mar 2008
- 25 Feb 2008
include/linux/swap.h | 3 ---
mm/swapfile.c | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
bb7f3cffcbe9023d345ff94dd983292613a8de6b diff --git a/include/linux/swap.h b/include/linux/swap.h
index 878459a..9c9f4e5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
/* linux/mm/swapfile.c */
extern long total_swap_pages;
-extern unsigned int nr_swapfiles;
extern void si_swapinfo(struct sysinfo *);
extern swp_entry_t get_swap_page(void);
extern swp_entry_t get_swap_page_of_type(int);
@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info;
-extern spinlock_t swap_lock;
-
/* linux/mm/thrash.c */
extern struct mm_struct * swap_token_mm;
extern void grab_swap_token(void);
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2da149c..0b20c79 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -33,8 +33,8 @@
#include <asm/tlbflush.h>
#include <linux/swapops.h>
-DEFINE_SPINLOCK(swap_lock);
-unsigned int nr_swapfiles;
+static DEFINE_SPINLOCK(swap_lock);
+static unsigned int nr_swapfiles;
long total_swap_pages;
static int swap_overflow;
@@ -43,7 +43,7 @@ static const char Unused_file[] = "Unused swap file entry ";
static const char Bad_offset[] = "Bad swap offset entry ";
static const char Unused_offset[] = "Unused swap offset entry ";
-struct swap_list_t swap_list = {-1, -1};
+static struct swap_list_t swap_list = {-1, -1};
static struct swap_info_struct swap_info[MAX_SWAPFILES];
^ permalink raw reply [flat|nested] 6+ messages in thread* [2.6 patch] mm/swapfile.c: make code static
@ 2008-03-30 22:48 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-03-30 22:48 UTC (permalink / raw)
To: linux-kernel
This patch makes the following needlessly global code static:
- swap_lock
- nr_swapfiles
- struct swap_list
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
This patch has been sent on:
- 25 Feb 2008
include/linux/swap.h | 3 ---
mm/swapfile.c | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
bb7f3cffcbe9023d345ff94dd983292613a8de6b diff --git a/include/linux/swap.h b/include/linux/swap.h
index 878459a..9c9f4e5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
/* linux/mm/swapfile.c */
extern long total_swap_pages;
-extern unsigned int nr_swapfiles;
extern void si_swapinfo(struct sysinfo *);
extern swp_entry_t get_swap_page(void);
extern swp_entry_t get_swap_page_of_type(int);
@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info;
-extern spinlock_t swap_lock;
-
/* linux/mm/thrash.c */
extern struct mm_struct * swap_token_mm;
extern void grab_swap_token(void);
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2da149c..0b20c79 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -33,8 +33,8 @@
#include <asm/tlbflush.h>
#include <linux/swapops.h>
-DEFINE_SPINLOCK(swap_lock);
-unsigned int nr_swapfiles;
+static DEFINE_SPINLOCK(swap_lock);
+static unsigned int nr_swapfiles;
long total_swap_pages;
static int swap_overflow;
@@ -43,7 +43,7 @@ static const char Unused_file[] = "Unused swap file entry ";
static const char Bad_offset[] = "Bad swap offset entry ";
static const char Unused_offset[] = "Unused swap offset entry ";
-struct swap_list_t swap_list = {-1, -1};
+static struct swap_list_t swap_list = {-1, -1};
static struct swap_info_struct swap_info[MAX_SWAPFILES];
^ permalink raw reply [flat|nested] 6+ messages in thread* [2.6 patch] mm/swapfile.c: make code static
@ 2008-02-25 0:07 Adrian Bunk
0 siblings, 0 replies; 6+ messages in thread
From: Adrian Bunk @ 2008-02-25 0:07 UTC (permalink / raw)
To: linux-kernel
This patch makes the following needlessly global code static:
- swap_lock
- nr_swapfiles
- struct swap_list
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
include/linux/swap.h | 3 ---
mm/swapfile.c | 6 +++---
2 files changed, 3 insertions(+), 6 deletions(-)
bb7f3cffcbe9023d345ff94dd983292613a8de6b diff --git a/include/linux/swap.h b/include/linux/swap.h
index 878459a..9c9f4e5 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -237,7 +237,6 @@ extern struct page *swapin_readahead(swp_entry_t, gfp_t,
/* linux/mm/swapfile.c */
extern long total_swap_pages;
-extern unsigned int nr_swapfiles;
extern void si_swapinfo(struct sysinfo *);
extern swp_entry_t get_swap_page(void);
extern swp_entry_t get_swap_page_of_type(int);
@@ -254,8 +253,6 @@ extern int can_share_swap_page(struct page *);
extern int remove_exclusive_swap_page(struct page *);
struct backing_dev_info;
-extern spinlock_t swap_lock;
-
/* linux/mm/thrash.c */
extern struct mm_struct * swap_token_mm;
extern void grab_swap_token(void);
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2da149c..0b20c79 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -33,8 +33,8 @@
#include <asm/tlbflush.h>
#include <linux/swapops.h>
-DEFINE_SPINLOCK(swap_lock);
-unsigned int nr_swapfiles;
+static DEFINE_SPINLOCK(swap_lock);
+static unsigned int nr_swapfiles;
long total_swap_pages;
static int swap_overflow;
@@ -43,7 +43,7 @@ static const char Unused_file[] = "Unused swap file entry ";
static const char Bad_offset[] = "Bad swap offset entry ";
static const char Unused_offset[] = "Unused swap offset entry ";
-struct swap_list_t swap_list = {-1, -1};
+static struct swap_list_t swap_list = {-1, -1};
static struct swap_info_struct swap_info[MAX_SWAPFILES];
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-05 20:16 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-05 18:27 [2.6 patch] mm/swapfile.c: make code static Adrian Bunk
2008-05-05 20:16 ` KOSAKI Motohiro
-- strict thread matches above, loose matches on Subject: below --
2008-04-21 21:32 Adrian Bunk
2008-04-14 18:13 Adrian Bunk
2008-03-30 22:48 Adrian Bunk
2008-02-25 0:07 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®