aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acmacros.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2008-06-10 00:49:56 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:03 -0400
commit6719561f9b4281491f58ed9f0bbc179dc7db95b7 (patch)
tree07e02cce159c0eca43698ffad06ed03127c01646 /include/acpi/acmacros.h
parentc91d924e3af08d4f98eab6ebf81f2b8ce132448f (diff)
ACPICA: Update tracking macros to reduce code/data size
Changed ACPI_MODULE_NAME and ACPI_FUNCTION_NAME to use arrays of strings instead of pointers to static strings. Jan Beulich and Bob Moore. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include/acpi/acmacros.h')
-rw-r--r--include/acpi/acmacros.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index fb41a3b802fc..5ad6e3992304 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -414,7 +414,7 @@ struct acpi_integer_overlay {
414 * error messages. The __FILE__ macro is not very useful for this, because it 414 * error messages. The __FILE__ macro is not very useful for this, because it
415 * often includes the entire pathname to the module 415 * often includes the entire pathname to the module
416 */ 416 */
417#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; 417#define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR _acpi_module_name[] = name;
418#else 418#else
419#define ACPI_MODULE_NAME(name) 419#define ACPI_MODULE_NAME(name)
420#endif 420#endif
@@ -467,19 +467,17 @@ struct acpi_integer_overlay {
467/* 467/*
468 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, 468 * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
469 * define it now. This is the case where there the compiler does not support 469 * define it now. This is the case where there the compiler does not support
470 * a __FUNCTION__ macro or equivalent. We save the function name on the 470 * a __FUNCTION__ macro or equivalent.
471 * local stack.
472 */ 471 */
473#ifndef ACPI_GET_FUNCTION_NAME 472#ifndef ACPI_GET_FUNCTION_NAME
474#define ACPI_GET_FUNCTION_NAME _acpi_function_name 473#define ACPI_GET_FUNCTION_NAME _acpi_function_name
475/* 474/*
476 * The Name parameter should be the procedure name as a quoted string. 475 * The Name parameter should be the procedure name as a quoted string.
477 * This is declared as a local string ("MyFunctionName") so that it can 476 * The function name is also used by the function exit macros below.
478 * be also used by the function exit macros below.
479 * Note: (const char) is used to be compatible with the debug interfaces 477 * Note: (const char) is used to be compatible with the debug interfaces
480 * and macros such as __FUNCTION__. 478 * and macros such as __FUNCTION__.
481 */ 479 */
482#define ACPI_FUNCTION_NAME(name) const char *_acpi_function_name = #name; 480#define ACPI_FUNCTION_NAME(name) static const char _acpi_function_name[] = #name;
483 481
484#else 482#else
485/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ 483/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */