linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] swsusp: make some code static
@ 2004-12-12 20:00 Adrian Bunk
  2004-12-12 20:20 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2004-12-12 20:00 UTC (permalink / raw)
  To: pavel; +Cc: linux-kernel

The patch below makes some needlessly global code static.


diffstat output:
 kernel/power/swsusp.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.10-rc2-mm4-full/kernel/power/swsusp.c.old	2004-12-12 03:05:03.000000000 +0100
+++ linux-2.6.10-rc2-mm4-full/kernel/power/swsusp.c	2004-12-12 03:07:44.000000000 +0100
@@ -78,8 +78,8 @@
 extern int is_head_of_free_region(struct page *);
 
 /* Variables to be preserved over suspend */
-int pagedir_order_check;
-int nr_copy_pages_check;
+static int pagedir_order_check;
+static int nr_copy_pages_check;
 
 extern char resume_file[];
 static dev_t resume_device;
@@ -105,14 +105,14 @@
 
 #define SWSUSP_SIG	"S1SUSPEND"
 
-struct swsusp_header {
+static struct swsusp_header {
 	char reserved[PAGE_SIZE - 20 - sizeof(swp_entry_t)];
 	swp_entry_t swsusp_info;
 	char	orig_sig[10];
 	char	sig[10];
 } __attribute__((packed, aligned(PAGE_SIZE))) swsusp_header;
 
-struct swsusp_info swsusp_info;
+static struct swsusp_info swsusp_info;
 
 /*
  * XXX: We try to keep some more pages free so that I/O operations succeed
@@ -175,7 +175,7 @@
 		resume_device == MKDEV(imajor(inode), iminor(inode));
 }
 
-int swsusp_swap_check(void) /* This is called before saving image */
+static int swsusp_swap_check(void) /* This is called before saving image */
 {
 	int i, len;
 	
@@ -422,7 +422,7 @@
 	struct highmem_page *next;
 };
 
-struct highmem_page *highmem_copy = NULL;
+static struct highmem_page *highmem_copy = NULL;
 
 static int save_highmem_zone(struct zone *zone)
 {
@@ -785,7 +785,7 @@
 	return 0;
 }
 
-int suspend_prepare_image(void)
+static int suspend_prepare_image(void)
 {
 	unsigned int nr_needed_pages = 0;
 	int error;
@@ -1061,12 +1061,12 @@
 	return error;
 }
 
-int bio_read_page(pgoff_t page_off, void * page)
+static int bio_read_page(pgoff_t page_off, void * page)
 {
 	return submit(READ, page_off, page);
 }
 
-int bio_write_page(pgoff_t page_off, void * page)
+static int bio_write_page(pgoff_t page_off, void * page)
 {
 	return submit(WRITE, page_off, page);
 }


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] swsusp: make some code static
  2004-12-12 20:00 [2.6 patch] swsusp: make some code static Adrian Bunk
@ 2004-12-12 20:20 ` Pavel Machek
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2004-12-12 20:20 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

Hi!

> The patch below makes some needlessly global code static.

Thanks, applied to my try, I'll eventually propagate into mainline.

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-12 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-12 20:00 [2.6 patch] swsusp: make some code static Adrian Bunk
2004-12-12 20:20 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).