aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/tables/tbutils.c')
-rw-r--r--drivers/acpi/tables/tbutils.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 9d0bf536d674..38c6749e43d5 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore 8 * Copyright (C) 2000 - 2006, R. Byron Moore
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -144,14 +144,13 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
144{ 144{
145 acpi_name signature; 145 acpi_name signature;
146 146
147 ACPI_FUNCTION_NAME("tb_validate_table_header"); 147 ACPI_FUNCTION_ENTRY();
148 148
149 /* Verify that this is a valid address */ 149 /* Verify that this is a valid address */
150 150
151 if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) { 151 if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) {
152 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 152 ACPI_REPORT_ERROR(("Cannot read table header at %p\n",
153 "Cannot read table header at %p\n", 153 table_header));
154 table_header));
155 154
156 return (AE_BAD_ADDRESS); 155 return (AE_BAD_ADDRESS);
157 } 156 }
@@ -160,12 +159,10 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
160 159
161 ACPI_MOVE_32_TO_32(&signature, table_header->signature); 160 ACPI_MOVE_32_TO_32(&signature, table_header->signature);
162 if (!acpi_ut_valid_acpi_name(signature)) { 161 if (!acpi_ut_valid_acpi_name(signature)) {
163 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 162 ACPI_REPORT_ERROR(("Table signature at %p [%p] has invalid characters\n", table_header, &signature));
164 "Table signature at %p [%p] has invalid characters\n",
165 table_header, &signature));
166 163
167 ACPI_REPORT_WARNING(("Invalid table signature found: [%4.4s]\n", 164 ACPI_REPORT_WARNING(("Invalid table signature found: [%4.4s]\n",
168 (char *)&signature)); 165 ACPI_CAST_PTR(char, &signature)));
169 166
170 ACPI_DUMP_BUFFER(table_header, 167 ACPI_DUMP_BUFFER(table_header,
171 sizeof(struct acpi_table_header)); 168 sizeof(struct acpi_table_header));
@@ -175,9 +172,7 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
175 /* Validate the table length */ 172 /* Validate the table length */
176 173
177 if (table_header->length < sizeof(struct acpi_table_header)) { 174 if (table_header->length < sizeof(struct acpi_table_header)) {
178 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 175 ACPI_REPORT_ERROR(("Invalid length in table header %p name %4.4s\n", table_header, (char *)&signature));
179 "Invalid length in table header %p name %4.4s\n",
180 table_header, (char *)&signature));
181 176
182 ACPI_REPORT_WARNING(("Invalid table header length (0x%X) found\n", (u32) table_header->length)); 177 ACPI_REPORT_WARNING(("Invalid table header length (0x%X) found\n", (u32) table_header->length));
183 178
@@ -291,8 +286,7 @@ acpi_tb_handle_to_object(u16 table_id,
291 } 286 }
292 } 287 }
293 288
294 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "table_id=%X does not exist\n", 289 ACPI_REPORT_ERROR(("table_id=%X does not exist\n", table_id));
295 table_id));
296 return (AE_BAD_PARAMETER); 290 return (AE_BAD_PARAMETER);
297} 291}
298#endif 292#endif