From: Thomas Renninger <trenn@suse.de>
To: ak@linux.intel.com
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
robert.moore@intel.com, Thomas Renninger <trenn@suse.de>
Subject: [PATCH 3/9] ACPI processor: Debug interface used for error message cleanup
Date: Wed, 30 Jul 2008 22:22:16 +0200 [thread overview]
Message-ID: <1217449342-20312-4-git-send-email-trenn@suse.de> (raw)
In-Reply-To: <1217449342-20312-1-git-send-email-trenn@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
drivers/acpi/processor_perflib.c | 21 ++++++++++-----------
drivers/acpi/processor_throttling.c | 17 ++++++-----------
2 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index b474996..f643068 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -512,14 +512,13 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
}
psd = buffer.pointer;
- if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
- result = -EFAULT;
- goto end;
- }
-
- if (psd->package.count != 1) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+ if (!psd || (psd->type != ACPI_TYPE_PACKAGE)
+ || psd->package.count != 1) {
+ /*
+ * ToDo: Mark it as BIOS bug as soon as there is an interface
+ * for it
+ */
+ printk(KERN_ERR "Invalid _PSD data\n");
result = -EFAULT;
goto end;
}
@@ -532,19 +531,19 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
status = acpi_extract_package(&(psd->package.elements[0]),
&format, &state);
if (ACPI_FAILURE(status)) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
+ ACPI_ERROR((DB_INFO, status, "Invalid _PSD data\n"));
result = -EFAULT;
goto end;
}
if (pdomain->num_entries != ACPI_PSD_REV0_ENTRIES) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:num_entries\n"));
+ printk(KERN_ERR "Unknown _PSD:num_entries\n");
result = -EFAULT;
goto end;
}
if (pdomain->revision != ACPI_PSD_REV0_REVISION) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _PSD:revision\n"));
+ printk(KERN_ERR "Unknown _PSD:revision\n"));
result = -EFAULT;
goto end;
}
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index 0622ace..95de498 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -527,14 +527,9 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
}
tsd = buffer.pointer;
- if (!tsd || (tsd->type != ACPI_TYPE_PACKAGE)) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n"));
- result = -EFAULT;
- goto end;
- }
-
- if (tsd->package.count != 1) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n"));
+ if (!tsd || (tsd->type != ACPI_TYPE_PACKAGE)
+ || tsd->package.count != 1) {
+ printk(KERN_INFO "Invalid _TSD data\n");
result = -EFAULT;
goto end;
}
@@ -547,19 +542,19 @@ static int acpi_processor_get_tsd(struct acpi_processor *pr)
status = acpi_extract_package(&(tsd->package.elements[0]),
&format, &state);
if (ACPI_FAILURE(status)) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _TSD data\n"));
+ ACPI_ERROR(DB_INFO, status, "Invalid _TSD data\n"));
result = -EFAULT;
goto end;
}
if (pdomain->num_entries != ACPI_TSD_REV0_ENTRIES) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _TSD:num_entries\n"));
+ printk(KERN_ERR "Unknown _TSD:num_entries\n"));
result = -EFAULT;
goto end;
}
if (pdomain->revision != ACPI_TSD_REV0_REVISION) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown _TSD:revision\n"));
+ printk(KERN_ERR "Unknown _TSD:revision\n"));
result = -EFAULT;
goto end;
}
--
1.5.4.5
next prev parent reply other threads:[~2008-07-30 20:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 20:22 Debug interface used for error message cleanups Thomas Renninger
2008-07-30 20:22 ` [PATCH 1/9] ACPI cm_sbs: Debug interface used for error message cleanup Thomas Renninger
2008-07-30 20:22 ` [PATCH 2/9] ACPI memhotplug: " Thomas Renninger
2008-07-30 20:22 ` Thomas Renninger [this message]
2008-07-30 20:22 ` [PATCH 4/9] ACPI video: " Thomas Renninger
2008-07-30 20:22 ` [PATCH 5/9] ACPI scan: " Thomas Renninger
2008-07-30 20:22 ` [PATCH 6/9] ACPI fan: " Thomas Renninger
2008-07-30 20:22 ` [PATCH 7/9] ACPI osl: " Thomas Renninger
2008-07-30 20:22 ` [PATCH 8/9] ACPI thermal: " Thomas Renninger
2008-07-30 20:22 ` [PATCH 9/9] ACPI system: " Thomas Renninger
2008-07-30 20:29 ` Debug interface used for error message cleanups Moore, Robert
2008-07-30 20:55 ` Andi Kleen
2008-07-31 9:59 ` Thomas Renninger
2008-07-31 21:42 ` Moore, Robert
2008-08-01 1:42 ` Zhang Rui
2008-08-01 9:01 ` Thomas Renninger
2008-08-01 15:45 ` Moore, Robert
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=1217449342-20312-4-git-send-email-trenn@suse.de \
--to=trenn@suse.de \
--cc=ak@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=robert.moore@intel.com \
/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