From: Ben Hutchings <ben@decadent.org.uk>
To: Ingo Molnar <mingo@elte.hu>, Don Zickus <dzickus@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org, 599368@bugs.debian.org,
608138@bugs.debian.org
Subject: [PATCH] watchdog: Improve failure message and documentation
Date: Sun, 02 Jan 2011 22:00:10 +0000 [thread overview]
Message-ID: <1294005610.3167.99.camel@localhost> (raw)
[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]
The error message 'NMI watchdog failed to create perf event...'
currently prints the error value as a pointer, rather than extracting
the error code with PTR_ERR(). Fix that.
Add a note about the 'nowatchdog' kernel parameter to associate it
with this message.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
Documentation/kernel-parameters.txt | 2 +-
kernel/watchdog.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 7d0cead..6fc0cf4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1764,7 +1764,7 @@ and is between 256 and 4096 characters. It is defined in the file
nousb [USB] Disable the USB subsystem
- nowatchdog [KNL] Disable the lockup detector.
+ nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
nowb [ARM]
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index d74e866..5b44d2c 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -366,7 +366,8 @@ static int watchdog_nmi_enable(int cpu)
goto out_save;
}
- printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
+ printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %ld\n",
+ cpu, PTR_ERR(event));
return PTR_ERR(event);
/* success path */
--
1.7.2.3
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next reply other threads:[~2011-01-02 22:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-02 22:00 Ben Hutchings [this message]
2011-01-02 23:02 ` [PATCH v2] watchdog: Improve initialisation error message and documentation Ben Hutchings
2011-01-03 13:56 ` Don Zickus
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=1294005610.3167.99.camel@localhost \
--to=ben@decadent.org.uk \
--cc=599368@bugs.debian.org \
--cc=608138@bugs.debian.org \
--cc=dzickus@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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