From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: pm list <linux-pm@lists.linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>
Subject: [PATCH 3/6] Suspend: Use common prefix in messages
Date: Tue, 27 Nov 2007 00:30:10 +0100 [thread overview]
Message-ID: <200711270030.10561.rjw@sisk.pl> (raw)
In-Reply-To: <200711270025.08128.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
Make suspend messages start with one common prefix "PM: ".
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
kernel/power/main.c | 19 ++++++++++---------
kernel/power/power.h | 2 ++
2 files changed, 12 insertions(+), 9 deletions(-)
Index: linux-2.6/kernel/power/main.c
===================================================================
--- linux-2.6.orig/kernel/power/main.c
+++ linux-2.6/kernel/power/main.c
@@ -183,11 +183,11 @@ static int suspend_prepare(void)
free_pages = global_page_state(NR_FREE_PAGES);
if (free_pages < FREE_PAGE_NUMBER) {
- pr_debug("PM: free some memory\n");
+ pr_debug(PREFIX "Free some memory\n");
shrink_all_memory(FREE_PAGE_NUMBER - free_pages);
if (nr_free_pages() < FREE_PAGE_NUMBER) {
error = -ENOMEM;
- printk(KERN_ERR "PM: No enough memory\n");
+ printk(KERN_ERR PREFIX "No enough memory\n");
}
}
if (!error)
@@ -227,7 +227,7 @@ static int suspend_enter(suspend_state_t
BUG_ON(!irqs_disabled());
if ((error = device_power_down(PMSG_SUSPEND))) {
- printk(KERN_ERR "Some devices failed to power down\n");
+ printk(KERN_ERR PREFIX "Some devices failed to power down\n");
goto Done;
}
@@ -261,7 +261,7 @@ int suspend_devices_and_enter(suspend_st
suspend_console();
error = device_suspend(PMSG_SUSPEND);
if (error) {
- printk(KERN_ERR "Some devices failed to suspend\n");
+ printk(KERN_ERR PREFIX "Some devices failed to suspend\n");
goto Resume_console;
}
@@ -344,11 +344,12 @@ static int enter_state(suspend_state_t s
if (!mutex_trylock(&pm_mutex))
return -EBUSY;
- printk("Syncing filesystems ... ");
+ printk(KERN_INFO PREFIX "Syncing filesystems ... ");
sys_sync();
- printk("done.\n");
+ printk(KERN_INFO "done.\n");
- pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
+ pr_debug(PREFIX "Preparing system to enter %s sleep state\n",
+ pm_states[state]);
error = suspend_prepare();
if (error)
goto Unlock;
@@ -356,11 +357,11 @@ static int enter_state(suspend_state_t s
if (suspend_test(TEST_FREEZER))
goto Finish;
- pr_debug("PM: Entering %s sleep\n", pm_states[state]);
+ pr_debug(PREFIX "Entering %s sleep state\n", pm_states[state]);
error = suspend_devices_and_enter(state);
Finish:
- pr_debug("PM: Finishing wakeup.\n");
+ pr_debug(PREFIX "Finishing wakeup.\n");
suspend_finish();
Unlock:
mutex_unlock(&pm_mutex);
Index: linux-2.6/kernel/power/power.h
===================================================================
--- linux-2.6.orig/kernel/power/power.h
+++ linux-2.6/kernel/power/power.h
@@ -2,6 +2,8 @@
#include <linux/suspend_ioctls.h>
#include <linux/utsname.h>
+#define PREFIX "PM: "
+
struct swsusp_info {
struct new_utsname uts;
u32 version_code;
next prev parent reply other threads:[~2007-11-26 23:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-26 23:25 [PATCH 0/6] Suspend and hibernation code cleanups Rafael J. Wysocki
2007-11-26 23:27 ` [PATCH 1/6] Suspend: Fix compilation warning for CONFIG_SUSPEND unset Rafael J. Wysocki
2007-11-27 0:12 ` Pavel Machek
2007-11-26 23:29 ` [PATCH 2/6] Hibernation: Move low level resume to disk.c Rafael J. Wysocki
2007-11-27 0:29 ` Pavel Machek
2007-11-27 16:06 ` Rafael J. Wysocki
2007-11-26 23:30 ` Rafael J. Wysocki [this message]
2007-11-27 0:21 ` [PATCH 3/6] Suspend: Use common prefix in messages Pavel Machek
2007-11-27 16:16 ` Rafael J. Wysocki
2007-11-26 23:31 ` [PATCH 4/6] Suspend: Fix comment in main.c Rafael J. Wysocki
2007-11-27 0:14 ` Pavel Machek
2007-11-26 23:32 ` [PATCH 5/6] Hibernation: Use common prefix in messages Rafael J. Wysocki
2007-11-27 0:20 ` Pavel Machek
2007-11-26 23:33 ` [PATCH 6/6] Hibernation: Move extern definition to header file Rafael J. Wysocki
2007-11-27 0:23 ` 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=200711270030.10561.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox