From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@zip.com.au>,
kernel list <linux-kernel@vger.kernel.org>
Subject: [patch 01/04] swsusp: fix printks and cleanups
Date: Thu, 14 Jul 2005 02:45:41 +0200 [thread overview]
Message-ID: <20050714004541.GA7836@elf.ucw.cz> (raw)
From: Pavel Machek <pavel@ucw.cz>
Fix error printing in swsusp.c: add loglevels and add very usefull error
information. Trivial cleanup for disk.c.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
kernel/power/disk.c | 8 ++------
kernel/power/swsusp.c | 3 ++-
2 files changed, 4 insertions(+), 7 deletions(-)
diff -puN kernel/power/disk.c~swsusp-fix-printks-and-cleanups kernel/power/disk.c
--- devel/kernel/power/disk.c~swsusp-fix-printks-and-cleanups 2005-07-12 02:14:51.000000000 -0700
+++ devel-akpm/kernel/power/disk.c 2005-07-12 02:14:51.000000000 -0700
@@ -52,21 +52,17 @@ static void power_down(suspend_disk_meth
unsigned long flags;
int error = 0;
+ device_shutdown();
+ local_irq_save(flags);
switch(mode) {
case PM_DISK_PLATFORM:
- device_shutdown();
- local_irq_save(flags);
error = pm_ops->enter(PM_SUSPEND_DISK);
break;
case PM_DISK_SHUTDOWN:
printk("Powering off system\n");
- device_shutdown();
- local_irq_save(flags);
machine_power_off();
break;
case PM_DISK_REBOOT:
- device_shutdown();
- local_irq_save(flags);
machine_restart(NULL);
break;
}
diff -puN kernel/power/swsusp.c~swsusp-fix-printks-and-cleanups kernel/power/swsusp.c
--- devel/kernel/power/swsusp.c~swsusp-fix-printks-and-cleanups 2005-07-12 02:14:51.000000000 -0700
+++ devel-akpm/kernel/power/swsusp.c 2005-07-12 02:14:51.000000000 -0700
@@ -886,6 +886,7 @@ int swsusp_suspend(void)
* at resume time, and evil weirdness ensues.
*/
if ((error = device_power_down(PMSG_FREEZE))) {
+ printk(KERN_ERR "Some devices failed to power down, aborting suspend\n");
local_irq_enable();
return error;
}
@@ -899,7 +900,7 @@ int swsusp_suspend(void)
save_processor_state();
if ((error = swsusp_arch_suspend()))
- printk("Error %d suspending\n", error);
+ printk(KERN_ERR "Error %d suspending\n", error);
/* Restore control flow magically appears here */
restore_processor_state();
BUG_ON (nr_copy_pages_check != nr_copy_pages);
_
reply other threads:[~2005-07-14 0:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050714004541.GA7836@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®