diff options
Diffstat (limited to 'drivers/acpi/utilities/utdebug.c')
| -rw-r--r-- | drivers/acpi/utilities/utdebug.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index 7361204b1eef..f938f465efa4 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2007, R. Byron Moore | 8 | * Copyright (C) 2000 - 2008, Intel Corp. |
| 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 |
| @@ -68,9 +68,9 @@ static const char *acpi_ut_trim_function_name(const char *function_name); | |||
| 68 | 68 | ||
| 69 | void acpi_ut_init_stack_ptr_trace(void) | 69 | void acpi_ut_init_stack_ptr_trace(void) |
| 70 | { | 70 | { |
| 71 | u32 current_sp; | 71 | acpi_size current_sp; |
| 72 | 72 | ||
| 73 | acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF(¤t_sp, NULL); | 73 | acpi_gbl_entry_stack_pointer = ¤t_sp; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | /******************************************************************************* | 76 | /******************************************************************************* |
| @@ -89,10 +89,8 @@ void acpi_ut_track_stack_ptr(void) | |||
| 89 | { | 89 | { |
| 90 | acpi_size current_sp; | 90 | acpi_size current_sp; |
| 91 | 91 | ||
| 92 | current_sp = ACPI_PTR_DIFF(¤t_sp, NULL); | 92 | if (¤t_sp < acpi_gbl_lowest_stack_pointer) { |
| 93 | 93 | acpi_gbl_lowest_stack_pointer = ¤t_sp; | |
| 94 | if (current_sp < acpi_gbl_lowest_stack_pointer) { | ||
| 95 | acpi_gbl_lowest_stack_pointer = current_sp; | ||
| 96 | } | 94 | } |
| 97 | 95 | ||
| 98 | if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) { | 96 | if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) { |
| @@ -203,6 +201,7 @@ acpi_ut_debug_print(u32 requested_debug_level, | |||
| 203 | 201 | ||
| 204 | va_start(args, format); | 202 | va_start(args, format); |
| 205 | acpi_os_vprintf(format, args); | 203 | acpi_os_vprintf(format, args); |
| 204 | va_end(args); | ||
| 206 | } | 205 | } |
| 207 | 206 | ||
| 208 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) | 207 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print) |
| @@ -240,6 +239,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
| 240 | 239 | ||
| 241 | va_start(args, format); | 240 | va_start(args, format); |
| 242 | acpi_os_vprintf(format, args); | 241 | acpi_os_vprintf(format, args); |
| 242 | va_end(args); | ||
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) | 245 | ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) |
| @@ -524,6 +524,11 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display) | |||
| 524 | u32 temp32; | 524 | u32 temp32; |
| 525 | u8 buf_char; | 525 | u8 buf_char; |
| 526 | 526 | ||
| 527 | if (!buffer) { | ||
| 528 | acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n"); | ||
| 529 | return; | ||
| 530 | } | ||
| 531 | |||
| 527 | if ((count < 4) || (count & 0x01)) { | 532 | if ((count < 4) || (count & 0x01)) { |
| 528 | display = DB_BYTE_DISPLAY; | 533 | display = DB_BYTE_DISPLAY; |
| 529 | } | 534 | } |
