[ACPI] ACPICA 20060210
[deliverable/linux.git] / drivers / acpi / tables / tbconvrt.c
index a03939399fa9e309c7ef63ada9c01b90a0d4e2ad..254ebdbb7bef56e4c60bede6ae0ccc1fe173b822 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2005, R. Byron Moore
+ * Copyright (C) 2000 - 2006, R. Byron Moore
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -147,6 +147,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info)
        /* Copy the table pointers */
 
        for (i = 0; i < acpi_gbl_rsdt_table_count; i++) {
+
                /* RSDT pointers are 32 bits, XSDT pointers are 64 bits */
 
                if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
@@ -501,8 +502,8 @@ acpi_status acpi_tb_convert_table_fadt(void)
         * at least as long as the version 1.0 FADT
         */
        if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev1)) {
-               ACPI_REPORT_ERROR(("FADT is invalid, too short: 0x%X\n",
-                                  acpi_gbl_FADT->length));
+               ACPI_ERROR((AE_INFO, "FADT is invalid, too short: 0x%X",
+                           acpi_gbl_FADT->length));
                return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
        }
 
@@ -515,9 +516,13 @@ acpi_status acpi_tb_convert_table_fadt(void)
 
        if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) {
                if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) {
+
                        /* Length is too short to be a V2.0 table */
 
-                       ACPI_REPORT_WARNING(("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n", acpi_gbl_FADT->length, acpi_gbl_FADT->revision));
+                       ACPI_WARNING((AE_INFO,
+                                     "Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table",
+                                     acpi_gbl_FADT->length,
+                                     acpi_gbl_FADT->revision));
 
                        acpi_tb_convert_fadt1(local_fadt,
                                              (void *)acpi_gbl_FADT);
@@ -554,7 +559,9 @@ acpi_status acpi_tb_convert_table_fadt(void)
        ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
                          "Hex dump of common internal FADT, size %d (%X)\n",
                          acpi_gbl_FADT->length, acpi_gbl_FADT->length));
-       ACPI_DUMP_BUFFER((u8 *) (acpi_gbl_FADT), acpi_gbl_FADT->length);
+
+       ACPI_DUMP_BUFFER(ACPI_CAST_PTR(u8, acpi_gbl_FADT),
+                        acpi_gbl_FADT->length);
 
        return_ACPI_STATUS(AE_OK);
 }
@@ -580,13 +587,15 @@ acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info)
        /* Absolute minimum length is 24, but the ACPI spec says 64 */
 
        if (acpi_gbl_FACS->length < 24) {
-               ACPI_REPORT_ERROR(("Invalid FACS table length: 0x%X\n",
-                                  acpi_gbl_FACS->length));
+               ACPI_ERROR((AE_INFO, "Invalid FACS table length: 0x%X",
+                           acpi_gbl_FACS->length));
                return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH);
        }
 
        if (acpi_gbl_FACS->length < 64) {
-               ACPI_REPORT_WARNING(("FACS is shorter than the ACPI specification allows: 0x%X, using anyway\n", acpi_gbl_FACS->length));
+               ACPI_WARNING((AE_INFO,
+                             "FACS is shorter than the ACPI specification allows: 0x%X, using anyway",
+                             acpi_gbl_FACS->length));
        }
 
        /* Copy fields to the new FACS */
@@ -596,6 +605,7 @@ acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info)
        if ((acpi_gbl_RSDP->revision < 2) ||
            (acpi_gbl_FACS->length < 32) ||
            (!(acpi_gbl_FACS->xfirmware_waking_vector))) {
+
                /* ACPI 1.0 FACS or short table or optional X_ field is zero */
 
                acpi_gbl_common_fACS.firmware_waking_vector = ACPI_CAST_PTR(u64,
This page took 0.025764 seconds and 5 git commands to generate.