ACPICA: update Intel copyright
[deliverable/linux.git] / drivers / acpi / utilities / utdebug.c
index 61ad4f2daee2e8e4c8761e87de68eb5442b69601..f938f465efa4df6d0c2bd03f9dab870b7ec7e0f7 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -45,7 +45,6 @@
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utdebug")
-
 #ifdef ACPI_DEBUG_OUTPUT
 static acpi_thread_id acpi_gbl_prev_thread_id;
 static char *acpi_gbl_fn_entry_str = "----Entry";
@@ -69,9 +68,9 @@ static const char *acpi_ut_trim_function_name(const char *function_name);
 
 void acpi_ut_init_stack_ptr_trace(void)
 {
-       u32 current_sp;
+       acpi_size current_sp;
 
-       acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF(&current_sp, NULL);
+       acpi_gbl_entry_stack_pointer = &current_sp;
 }
 
 /*******************************************************************************
@@ -90,10 +89,8 @@ void acpi_ut_track_stack_ptr(void)
 {
        acpi_size current_sp;
 
-       current_sp = ACPI_PTR_DIFF(&current_sp, NULL);
-
-       if (current_sp < acpi_gbl_lowest_stack_pointer) {
-               acpi_gbl_lowest_stack_pointer = current_sp;
+       if (&current_sp < acpi_gbl_lowest_stack_pointer) {
+               acpi_gbl_lowest_stack_pointer = &current_sp;
        }
 
        if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) {
@@ -110,7 +107,7 @@ void acpi_ut_track_stack_ptr(void)
  * RETURN:      Updated pointer to the function name
  *
  * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present.
- *              This allows compiler macros such as __FUNCTION__ to be used
+ *              This allows compiler macros such as __func__ to be used
  *              with no change to the debug output.
  *
  ******************************************************************************/
@@ -181,7 +178,8 @@ acpi_ut_debug_print(u32 requested_debug_level,
                if (ACPI_LV_THREADS & acpi_dbg_level) {
                        acpi_os_printf
                            ("\n**** Context Switch from TID %lX to TID %lX ****\n\n",
-                            (unsigned long)acpi_gbl_prev_thread_id, (unsigned long)thread_id);
+                            (unsigned long)acpi_gbl_prev_thread_id,
+                            (unsigned long)thread_id);
                }
 
                acpi_gbl_prev_thread_id = thread_id;
@@ -203,6 +201,7 @@ acpi_ut_debug_print(u32 requested_debug_level,
 
        va_start(args, format);
        acpi_os_vprintf(format, args);
+       va_end(args);
 }
 
 ACPI_EXPORT_SYMBOL(acpi_ut_debug_print)
@@ -240,6 +239,7 @@ acpi_ut_debug_print_raw(u32 requested_debug_level,
 
        va_start(args, format);
        acpi_os_vprintf(format, args);
+       va_end(args);
 }
 
 ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw)
@@ -524,6 +524,11 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)
        u32 temp32;
        u8 buf_char;
 
+       if (!buffer) {
+               acpi_os_printf("Null Buffer Pointer in DumpBuffer!\n");
+               return;
+       }
+
        if ((count < 4) || (count & 0x01)) {
                display = DB_BYTE_DISPLAY;
        }
This page took 0.027473 seconds and 5 git commands to generate.