diff options
author | Bob Moore <robert.moore@intel.com> | 2006-01-13 16:22:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-01-20 02:23:50 -0500 |
commit | 4a90c7e86202f46fa9af011bdbcdf36e355d1721 (patch) | |
tree | 3784cffb2166330d6f94ea53996fbeef36f58ce3 /drivers/acpi/utilities/utalloc.c | |
parent | 3c5c363826e435cf4d54d917202567e5b57cae5f (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/utilities/utalloc.c')
-rw-r--r-- | drivers/acpi/utilities/utalloc.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index b11b7ed788c6..0efcbdf7e620 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.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 |
@@ -301,7 +301,7 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) | |||
301 | /* Check for an inadvertent size of zero bytes */ | 301 | /* Check for an inadvertent size of zero bytes */ |
302 | 302 | ||
303 | if (!size) { | 303 | if (!size) { |
304 | _ACPI_REPORT_ERROR(module, line, component, | 304 | _ACPI_REPORT_ERROR(module, line, |
305 | ("ut_allocate: Attempt to allocate zero bytes, allocating 1 byte\n")); | 305 | ("ut_allocate: Attempt to allocate zero bytes, allocating 1 byte\n")); |
306 | size = 1; | 306 | size = 1; |
307 | } | 307 | } |
@@ -310,7 +310,7 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) | |||
310 | if (!allocation) { | 310 | if (!allocation) { |
311 | /* Report allocation error */ | 311 | /* Report allocation error */ |
312 | 312 | ||
313 | _ACPI_REPORT_ERROR(module, line, component, | 313 | _ACPI_REPORT_ERROR(module, line, |
314 | ("ut_allocate: Could not allocate size %X\n", | 314 | ("ut_allocate: Could not allocate size %X\n", |
315 | (u32) size)); | 315 | (u32) size)); |
316 | 316 | ||
@@ -344,7 +344,7 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line) | |||
344 | /* Check for an inadvertent size of zero bytes */ | 344 | /* Check for an inadvertent size of zero bytes */ |
345 | 345 | ||
346 | if (!size) { | 346 | if (!size) { |
347 | _ACPI_REPORT_ERROR(module, line, component, | 347 | _ACPI_REPORT_ERROR(module, line, |
348 | ("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n")); | 348 | ("ut_callocate: Attempt to allocate zero bytes, allocating 1 byte\n")); |
349 | size = 1; | 349 | size = 1; |
350 | } | 350 | } |
@@ -353,7 +353,7 @@ void *acpi_ut_callocate(acpi_size size, u32 component, char *module, u32 line) | |||
353 | if (!allocation) { | 353 | if (!allocation) { |
354 | /* Report allocation error */ | 354 | /* Report allocation error */ |
355 | 355 | ||
356 | _ACPI_REPORT_ERROR(module, line, component, | 356 | _ACPI_REPORT_ERROR(module, line, |
357 | ("ut_callocate: Could not allocate size %X\n", | 357 | ("ut_callocate: Could not allocate size %X\n", |
358 | (u32) size)); | 358 | (u32) size)); |
359 | return_PTR(NULL); | 359 | return_PTR(NULL); |
@@ -480,7 +480,7 @@ void *acpi_ut_callocate_and_track(acpi_size size, | |||
480 | if (!allocation) { | 480 | if (!allocation) { |
481 | /* Report allocation error */ | 481 | /* Report allocation error */ |
482 | 482 | ||
483 | _ACPI_REPORT_ERROR(module, line, component, | 483 | _ACPI_REPORT_ERROR(module, line, |
484 | ("ut_callocate: Could not allocate size %X\n", | 484 | ("ut_callocate: Could not allocate size %X\n", |
485 | (u32) size)); | 485 | (u32) size)); |
486 | return (NULL); | 486 | return (NULL); |
@@ -524,7 +524,7 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line) | |||
524 | ACPI_FUNCTION_TRACE_PTR("ut_free", allocation); | 524 | ACPI_FUNCTION_TRACE_PTR("ut_free", allocation); |
525 | 525 | ||
526 | if (NULL == allocation) { | 526 | if (NULL == allocation) { |
527 | _ACPI_REPORT_ERROR(module, line, component, | 527 | _ACPI_REPORT_ERROR(module, line, |
528 | ("acpi_ut_free: Attempt to delete a NULL address\n")); | 528 | ("acpi_ut_free: Attempt to delete a NULL address\n")); |
529 | 529 | ||
530 | return_VOID; | 530 | return_VOID; |
@@ -540,8 +540,8 @@ acpi_ut_free_and_track(void *allocation, u32 component, char *module, u32 line) | |||
540 | status = acpi_ut_remove_allocation(debug_block, | 540 | status = acpi_ut_remove_allocation(debug_block, |
541 | component, module, line); | 541 | component, module, line); |
542 | if (ACPI_FAILURE(status)) { | 542 | if (ACPI_FAILURE(status)) { |
543 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Could not free memory, %s\n", | 543 | ACPI_REPORT_ERROR(("Could not free memory, %s\n", |
544 | acpi_format_exception(status))); | 544 | acpi_format_exception(status))); |
545 | } | 545 | } |
546 | 546 | ||
547 | acpi_os_free(debug_block); | 547 | acpi_os_free(debug_block); |
@@ -626,8 +626,8 @@ acpi_ut_track_allocation(struct acpi_debug_mem_block *allocation, | |||
626 | if (element) { | 626 | if (element) { |
627 | ACPI_REPORT_ERROR(("ut_track_allocation: Allocation already present in list! (%p)\n", allocation)); | 627 | ACPI_REPORT_ERROR(("ut_track_allocation: Allocation already present in list! (%p)\n", allocation)); |
628 | 628 | ||
629 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Element %p Address %p\n", | 629 | ACPI_REPORT_ERROR(("Element %p Address %p\n", |
630 | element, allocation)); | 630 | element, allocation)); |
631 | 631 | ||
632 | goto unlock_and_exit; | 632 | goto unlock_and_exit; |
633 | } | 633 | } |
@@ -687,7 +687,7 @@ acpi_ut_remove_allocation(struct acpi_debug_mem_block *allocation, | |||
687 | if (NULL == mem_list->list_head) { | 687 | if (NULL == mem_list->list_head) { |
688 | /* No allocations! */ | 688 | /* No allocations! */ |
689 | 689 | ||
690 | _ACPI_REPORT_ERROR(module, line, component, | 690 | _ACPI_REPORT_ERROR(module, line, |
691 | ("ut_remove_allocation: Empty allocation list, nothing to free!\n")); | 691 | ("ut_remove_allocation: Empty allocation list, nothing to free!\n")); |
692 | 692 | ||
693 | return_ACPI_STATUS(AE_OK); | 693 | return_ACPI_STATUS(AE_OK); |
@@ -863,12 +863,10 @@ void acpi_ut_dump_allocations(u32 component, char *module) | |||
863 | /* Print summary */ | 863 | /* Print summary */ |
864 | 864 | ||
865 | if (!num_outstanding) { | 865 | if (!num_outstanding) { |
866 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 866 | ACPI_REPORT_INFO(("No outstanding allocations\n")); |
867 | "No outstanding allocations\n")); | ||
868 | } else { | 867 | } else { |
869 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 868 | ACPI_REPORT_ERROR(("%d(%X) Outstanding allocations\n", |
870 | "%d(%X) Outstanding allocations\n", | 869 | num_outstanding, num_outstanding)); |
871 | num_outstanding, num_outstanding)); | ||
872 | } | 870 | } |
873 | 871 | ||
874 | return_VOID; | 872 | return_VOID; |