aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbutils.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-13 16:22:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-20 02:23:50 -0500
commit4a90c7e86202f46fa9af011bdbcdf36e355d1721 (patch)
tree3784cffb2166330d6f94ea53996fbeef36f58ce3 /drivers/acpi/tables/tbutils.c
parent3c5c363826e435cf4d54d917202567e5b57cae5f (diff)
[ACPI] ACPICA 20060113
Added 2006 copyright. At SuSE's suggestion, enabled all error messages without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively. This preserves all error and warning messages in the non-debug version of the ACPICA code (this has been referred to as the "debug lite" option.) Over 200 cases were converted to create a total of over 380 error/warning messages across the ACPICA code. This increases the code and data size of the default non-debug version by about 13K. Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages. The size of the debug version remains about the same. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
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