From: Adrian Bunk <bunk@stusta.de>
To: pavel@suse.cz
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] swsusp: make some code static
Date: Sun, 12 Dec 2004 21:00:04 +0100 [thread overview]
Message-ID: <20041212200004.GO22324@stusta.de> (raw)
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);
}
next reply other threads:[~2004-12-12 20:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-12 20:00 Adrian Bunk [this message]
2004-12-12 20:20 ` [2.6 patch] swsusp: make some code static Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041212200004.GO22324@stusta.de \
--to=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.