summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbprint.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2013-09-23 03:52:29 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-09-24 01:46:24 +0200
commit94d4be6773e86a0d52d7e200fb3cda2b9013c862 (patch)
treef1c52b288ecac59b561eda72db3122f908436849 /drivers/acpi/acpica/tbprint.c
parentACPICA: Debugger: Add new command to display full namespace pathnames. (diff)
downloadlinux-94d4be6773e86a0d52d7e200fb3cda2b9013c862.tar.xz
linux-94d4be6773e86a0d52d7e200fb3cda2b9013c862.zip
ACPICA: Tables: Cleanup table checksum verification code.
This patch reduces code redundancy by moving the FACS/S3PT checksum verification skip logic into acpi_tb_verify_checksum() and other calls of this function also get benefit from this change. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/tbprint.c')
-rw-r--r--drivers/acpi/acpica/tbprint.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index dc963f823d2c..499759a23b41 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -190,6 +190,16 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)
{
u8 checksum;
+ /*
+ * FACS/S3PT:
+ * They are the odd tables, have no standard ACPI header and no checksum
+ */
+
+ if (ACPI_COMPARE_NAME(table->signature, ACPI_SIG_S3PT) ||
+ ACPI_COMPARE_NAME(table->signature, ACPI_SIG_FACS)) {
+ return (AE_OK);
+ }
+
/* Compute the checksum on the table */
checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length);