From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Pavel Machek <pavel@ucw.cz>,
linux-pm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [-mm patch] kernel/power/snapshot.c: cleanups
Date: Wed, 19 Apr 2006 00:17:41 +0200 [thread overview]
Message-ID: <20060418221741.GY11582@stusta.de> (raw)
In-Reply-To: <20060418031423.3cbef2f7.akpm@osdl.org>
[-- Attachment #1: Type: text/plain, Size: 1664 bytes --]
This patch contains the following cleanups:
- make needlessly global functions static
- make dummy functions static inline
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
kernel/power/snapshot.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--- linux-2.6.17-rc1-mm3-full/kernel/power/snapshot.c.old 2006-04-18 22:29:56.000000000 +0200
+++ linux-2.6.17-rc1-mm3-full/kernel/power/snapshot.c 2006-04-18 22:37:56.000000000 +0200
@@ -112,7 +112,7 @@
}
#ifdef CONFIG_HIGHMEM
-unsigned int count_highmem_pages(void)
+static unsigned int count_highmem_pages(void)
{
struct zone *zone;
unsigned long zone_pfn;
@@ -189,7 +189,7 @@
return 0;
}
-int save_highmem(void)
+static int save_highmem(void)
{
struct zone *zone;
int res = 0;
@@ -206,7 +206,7 @@
return 0;
}
-int restore_highmem(void)
+static int restore_highmem(void)
{
printk("swsusp: Restoring Highmem\n");
while (highmem_copy) {
@@ -223,9 +223,9 @@
return 0;
}
#else
-static unsigned int count_highmem_pages(void) {return 0;}
-static int save_highmem(void) {return 0;}
-static int restore_highmem(void) {return 0;}
+static inline unsigned int count_highmem_pages(void) {return 0;}
+static inline int save_highmem(void) {return 0;}
+static inline int restore_highmem(void) {return 0;}
#endif
unsigned int count_special_pages(void)
@@ -472,7 +472,8 @@
* On each page we set up a list of struct_pbe elements.
*/
-struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask, int safe_needed)
+static struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask,
+ int safe_needed)
{
unsigned int num;
struct pbe *pblist, *pbe;
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Pavel Machek <pavel@ucw.cz>,
linux-pm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [-mm patch] kernel/power/snapshot.c: cleanups
Date: Wed, 19 Apr 2006 00:17:41 +0200 [thread overview]
Message-ID: <20060418221741.GY11582@stusta.de> (raw)
In-Reply-To: <20060418031423.3cbef2f7.akpm@osdl.org>
This patch contains the following cleanups:
- make needlessly global functions static
- make dummy functions static inline
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
kernel/power/snapshot.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
--- linux-2.6.17-rc1-mm3-full/kernel/power/snapshot.c.old 2006-04-18 22:29:56.000000000 +0200
+++ linux-2.6.17-rc1-mm3-full/kernel/power/snapshot.c 2006-04-18 22:37:56.000000000 +0200
@@ -112,7 +112,7 @@
}
#ifdef CONFIG_HIGHMEM
-unsigned int count_highmem_pages(void)
+static unsigned int count_highmem_pages(void)
{
struct zone *zone;
unsigned long zone_pfn;
@@ -189,7 +189,7 @@
return 0;
}
-int save_highmem(void)
+static int save_highmem(void)
{
struct zone *zone;
int res = 0;
@@ -206,7 +206,7 @@
return 0;
}
-int restore_highmem(void)
+static int restore_highmem(void)
{
printk("swsusp: Restoring Highmem\n");
while (highmem_copy) {
@@ -223,9 +223,9 @@
return 0;
}
#else
-static unsigned int count_highmem_pages(void) {return 0;}
-static int save_highmem(void) {return 0;}
-static int restore_highmem(void) {return 0;}
+static inline unsigned int count_highmem_pages(void) {return 0;}
+static inline int save_highmem(void) {return 0;}
+static inline int restore_highmem(void) {return 0;}
#endif
unsigned int count_special_pages(void)
@@ -472,7 +472,8 @@
* On each page we set up a list of struct_pbe elements.
*/
-struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask, int safe_needed)
+static struct pbe *alloc_pagedir(unsigned int nr_pages, gfp_t gfp_mask,
+ int safe_needed)
{
unsigned int num;
struct pbe *pblist, *pbe;
next prev parent reply other threads:[~2006-04-18 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 10:14 2.6.17-rc1-mm3 Andrew Morton
2006-04-18 15:07 ` [-mm patch] fix VIDEO_DEV=m, VIDEO_V4L1_COMPAT=y Adrian Bunk
2006-04-18 22:10 ` [-mm patch] make pci/hotplug/acpiphp_glue.c:handle_hotplug_event_func() static Adrian Bunk
2006-04-18 22:14 ` [-mm patch] drivers/scsi/aic7xxx/: possible cleanups Adrian Bunk
2006-04-19 19:31 ` James Bottomley
2006-04-18 22:17 ` Adrian Bunk [this message]
2006-04-18 22:17 ` [-mm patch] kernel/power/snapshot.c: cleanups Adrian Bunk
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=20060418221741.GY11582@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@osdl.org \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
/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.