diff options
author | Bob Moore <robert.moore@intel.com> | 2008-06-10 01:55:53 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2008-07-16 17:27:04 -0400 |
commit | 4b8ed631679070c183c8ae7519d2bdb9df124ae4 (patch) | |
tree | 9d71083732fd8c3ff82f01c6601b8069789123e2 /drivers/acpi | |
parent | b52437641edf63cee2f2f73a189154989b4a7ff4 (diff) |
ACPICA: Add const qualifier for appropriate string constants
Mostly MODULE_NAME and printf format strings.
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 'drivers/acpi')
-rw-r--r-- | drivers/acpi/executer/exdump.c | 5 | ||||
-rw-r--r-- | drivers/acpi/namespace/nsutils.c | 24 | ||||
-rw-r--r-- | drivers/acpi/utilities/utalloc.c | 5 | ||||
-rw-r--r-- | drivers/acpi/utilities/utdebug.c | 26 | ||||
-rw-r--r-- | drivers/acpi/utilities/utmisc.c | 11 | ||||
-rw-r--r-- | drivers/acpi/utilities/utobject.c | 5 |
6 files changed, 44 insertions, 32 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 976016fda66a..c94638dc42e5 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
@@ -771,9 +771,10 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) | |||
771 | void | 771 | void |
772 | acpi_ex_dump_operands(union acpi_operand_object **operands, | 772 | acpi_ex_dump_operands(union acpi_operand_object **operands, |
773 | acpi_interpreter_mode interpreter_mode, | 773 | acpi_interpreter_mode interpreter_mode, |
774 | char *ident, | 774 | const char *ident, |
775 | u32 num_levels, | 775 | u32 num_levels, |
776 | char *note, char *module_name, u32 line_number) | 776 | const char *note, |
777 | const char *module_name, u32 line_number) | ||
777 | { | 778 | { |
778 | u32 i; | 779 | u32 i; |
779 | 780 | ||
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c index 5b5619c54594..b0817e1127b1 100644 --- a/drivers/acpi/namespace/nsutils.c +++ b/drivers/acpi/namespace/nsutils.c | |||
@@ -73,9 +73,9 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search); | |||
73 | ******************************************************************************/ | 73 | ******************************************************************************/ |
74 | 74 | ||
75 | void | 75 | void |
76 | acpi_ns_report_error(char *module_name, | 76 | acpi_ns_report_error(const char *module_name, |
77 | u32 line_number, | 77 | u32 line_number, |
78 | char *internal_name, acpi_status lookup_status) | 78 | const char *internal_name, acpi_status lookup_status) |
79 | { | 79 | { |
80 | acpi_status status; | 80 | acpi_status status; |
81 | u32 bad_name; | 81 | u32 bad_name; |
@@ -130,11 +130,11 @@ acpi_ns_report_error(char *module_name, | |||
130 | ******************************************************************************/ | 130 | ******************************************************************************/ |
131 | 131 | ||
132 | void | 132 | void |
133 | acpi_ns_report_method_error(char *module_name, | 133 | acpi_ns_report_method_error(const char *module_name, |
134 | u32 line_number, | 134 | u32 line_number, |
135 | char *message, | 135 | const char *message, |
136 | struct acpi_namespace_node *prefix_node, | 136 | struct acpi_namespace_node *prefix_node, |
137 | char *path, acpi_status method_status) | 137 | const char *path, acpi_status method_status) |
138 | { | 138 | { |
139 | acpi_status status; | 139 | acpi_status status; |
140 | struct acpi_namespace_node *node = prefix_node; | 140 | struct acpi_namespace_node *node = prefix_node; |
@@ -167,7 +167,8 @@ acpi_ns_report_method_error(char *module_name, | |||
167 | ******************************************************************************/ | 167 | ******************************************************************************/ |
168 | 168 | ||
169 | void | 169 | void |
170 | acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *message) | 170 | acpi_ns_print_node_pathname(struct acpi_namespace_node *node, |
171 | const char *message) | ||
171 | { | 172 | { |
172 | struct acpi_buffer buffer; | 173 | struct acpi_buffer buffer; |
173 | acpi_status status; | 174 | acpi_status status; |
@@ -296,7 +297,7 @@ u32 acpi_ns_local(acpi_object_type type) | |||
296 | 297 | ||
297 | void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) | 298 | void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) |
298 | { | 299 | { |
299 | char *next_external_char; | 300 | const char *next_external_char; |
300 | u32 i; | 301 | u32 i; |
301 | 302 | ||
302 | ACPI_FUNCTION_ENTRY(); | 303 | ACPI_FUNCTION_ENTRY(); |
@@ -363,7 +364,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
363 | { | 364 | { |
364 | u32 num_segments = info->num_segments; | 365 | u32 num_segments = info->num_segments; |
365 | char *internal_name = info->internal_name; | 366 | char *internal_name = info->internal_name; |
366 | char *external_name = info->next_external_char; | 367 | const char *external_name = info->next_external_char; |
367 | char *result = NULL; | 368 | char *result = NULL; |
368 | u32 i; | 369 | u32 i; |
369 | 370 | ||
@@ -471,7 +472,8 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) | |||
471 | * | 472 | * |
472 | *******************************************************************************/ | 473 | *******************************************************************************/ |
473 | 474 | ||
474 | acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | 475 | acpi_status |
476 | acpi_ns_internalize_name(const char *external_name, char **converted_name) | ||
475 | { | 477 | { |
476 | char *internal_name; | 478 | char *internal_name; |
477 | struct acpi_namestring_info info; | 479 | struct acpi_namestring_info info; |
@@ -527,7 +529,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name) | |||
527 | 529 | ||
528 | acpi_status | 530 | acpi_status |
529 | acpi_ns_externalize_name(u32 internal_name_length, | 531 | acpi_ns_externalize_name(u32 internal_name_length, |
530 | char *internal_name, | 532 | const char *internal_name, |
531 | u32 * converted_name_length, char **converted_name) | 533 | u32 * converted_name_length, char **converted_name) |
532 | { | 534 | { |
533 | u32 names_index = 0; | 535 | u32 names_index = 0; |
@@ -821,7 +823,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type) | |||
821 | 823 | ||
822 | acpi_status | 824 | acpi_status |
823 | acpi_ns_get_node(struct acpi_namespace_node *prefix_node, | 825 | acpi_ns_get_node(struct acpi_namespace_node *prefix_node, |
824 | char *pathname, | 826 | const char *pathname, |
825 | u32 flags, struct acpi_namespace_node **return_node) | 827 | u32 flags, struct acpi_namespace_node **return_node) |
826 | { | 828 | { |
827 | union acpi_generic_state scope_info; | 829 | union acpi_generic_state scope_info; |
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c index ede084829a70..3dfb8a442b26 100644 --- a/drivers/acpi/utilities/utalloc.c +++ b/drivers/acpi/utilities/utalloc.c | |||
@@ -309,7 +309,8 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer, | |||
309 | * | 309 | * |
310 | ******************************************************************************/ | 310 | ******************************************************************************/ |
311 | 311 | ||
312 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) | 312 | void *acpi_ut_allocate(acpi_size size, |
313 | u32 component, const char *module, u32 line) | ||
313 | { | 314 | { |
314 | void *allocation; | 315 | void *allocation; |
315 | 316 | ||
@@ -353,7 +354,7 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line) | |||
353 | ******************************************************************************/ | 354 | ******************************************************************************/ |
354 | 355 | ||
355 | void *acpi_ut_allocate_zeroed(acpi_size size, | 356 | void *acpi_ut_allocate_zeroed(acpi_size size, |
356 | u32 component, char *module, u32 line) | 357 | u32 component, const char *module, u32 line) |
357 | { | 358 | { |
358 | void *allocation; | 359 | void *allocation; |
359 | 360 | ||
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index 3919fe599f94..fd66ecb6741e 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
@@ -157,7 +157,8 @@ void ACPI_INTERNAL_VAR_XFACE | |||
157 | acpi_ut_debug_print(u32 requested_debug_level, | 157 | acpi_ut_debug_print(u32 requested_debug_level, |
158 | u32 line_number, | 158 | u32 line_number, |
159 | const char *function_name, | 159 | const char *function_name, |
160 | char *module_name, u32 component_id, char *format, ...) | 160 | const char *module_name, |
161 | u32 component_id, const char *format, ...) | ||
161 | { | 162 | { |
162 | acpi_thread_id thread_id; | 163 | acpi_thread_id thread_id; |
163 | va_list args; | 164 | va_list args; |
@@ -228,7 +229,8 @@ void ACPI_INTERNAL_VAR_XFACE | |||
228 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 229 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
229 | u32 line_number, | 230 | u32 line_number, |
230 | const char *function_name, | 231 | const char *function_name, |
231 | char *module_name, u32 component_id, char *format, ...) | 232 | const char *module_name, |
233 | u32 component_id, const char *format, ...) | ||
232 | { | 234 | { |
233 | va_list args; | 235 | va_list args; |
234 | 236 | ||
@@ -261,7 +263,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw) | |||
261 | ******************************************************************************/ | 263 | ******************************************************************************/ |
262 | void | 264 | void |
263 | acpi_ut_trace(u32 line_number, | 265 | acpi_ut_trace(u32 line_number, |
264 | const char *function_name, char *module_name, u32 component_id) | 266 | const char *function_name, |
267 | const char *module_name, u32 component_id) | ||
265 | { | 268 | { |
266 | 269 | ||
267 | acpi_gbl_nesting_level++; | 270 | acpi_gbl_nesting_level++; |
@@ -293,7 +296,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace) | |||
293 | void | 296 | void |
294 | acpi_ut_trace_ptr(u32 line_number, | 297 | acpi_ut_trace_ptr(u32 line_number, |
295 | const char *function_name, | 298 | const char *function_name, |
296 | char *module_name, u32 component_id, void *pointer) | 299 | const char *module_name, u32 component_id, void *pointer) |
297 | { | 300 | { |
298 | acpi_gbl_nesting_level++; | 301 | acpi_gbl_nesting_level++; |
299 | acpi_ut_track_stack_ptr(); | 302 | acpi_ut_track_stack_ptr(); |
@@ -324,7 +327,7 @@ acpi_ut_trace_ptr(u32 line_number, | |||
324 | void | 327 | void |
325 | acpi_ut_trace_str(u32 line_number, | 328 | acpi_ut_trace_str(u32 line_number, |
326 | const char *function_name, | 329 | const char *function_name, |
327 | char *module_name, u32 component_id, char *string) | 330 | const char *module_name, u32 component_id, char *string) |
328 | { | 331 | { |
329 | 332 | ||
330 | acpi_gbl_nesting_level++; | 333 | acpi_gbl_nesting_level++; |
@@ -356,7 +359,7 @@ acpi_ut_trace_str(u32 line_number, | |||
356 | void | 359 | void |
357 | acpi_ut_trace_u32(u32 line_number, | 360 | acpi_ut_trace_u32(u32 line_number, |
358 | const char *function_name, | 361 | const char *function_name, |
359 | char *module_name, u32 component_id, u32 integer) | 362 | const char *module_name, u32 component_id, u32 integer) |
360 | { | 363 | { |
361 | 364 | ||
362 | acpi_gbl_nesting_level++; | 365 | acpi_gbl_nesting_level++; |
@@ -386,7 +389,8 @@ acpi_ut_trace_u32(u32 line_number, | |||
386 | 389 | ||
387 | void | 390 | void |
388 | acpi_ut_exit(u32 line_number, | 391 | acpi_ut_exit(u32 line_number, |
389 | const char *function_name, char *module_name, u32 component_id) | 392 | const char *function_name, |
393 | const char *module_name, u32 component_id) | ||
390 | { | 394 | { |
391 | 395 | ||
392 | acpi_ut_debug_print(ACPI_LV_FUNCTIONS, | 396 | acpi_ut_debug_print(ACPI_LV_FUNCTIONS, |
@@ -417,7 +421,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit) | |||
417 | void | 421 | void |
418 | acpi_ut_status_exit(u32 line_number, | 422 | acpi_ut_status_exit(u32 line_number, |
419 | const char *function_name, | 423 | const char *function_name, |
420 | char *module_name, u32 component_id, acpi_status status) | 424 | const char *module_name, |
425 | u32 component_id, acpi_status status) | ||
421 | { | 426 | { |
422 | 427 | ||
423 | if (ACPI_SUCCESS(status)) { | 428 | if (ACPI_SUCCESS(status)) { |
@@ -458,7 +463,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit) | |||
458 | void | 463 | void |
459 | acpi_ut_value_exit(u32 line_number, | 464 | acpi_ut_value_exit(u32 line_number, |
460 | const char *function_name, | 465 | const char *function_name, |
461 | char *module_name, u32 component_id, acpi_integer value) | 466 | const char *module_name, |
467 | u32 component_id, acpi_integer value) | ||
462 | { | 468 | { |
463 | 469 | ||
464 | acpi_ut_debug_print(ACPI_LV_FUNCTIONS, | 470 | acpi_ut_debug_print(ACPI_LV_FUNCTIONS, |
@@ -490,7 +496,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit) | |||
490 | void | 496 | void |
491 | acpi_ut_ptr_exit(u32 line_number, | 497 | acpi_ut_ptr_exit(u32 line_number, |
492 | const char *function_name, | 498 | const char *function_name, |
493 | char *module_name, u32 component_id, u8 * ptr) | 499 | const char *module_name, u32 component_id, u8 *ptr) |
494 | { | 500 | { |
495 | 501 | ||
496 | acpi_ut_debug_print(ACPI_LV_FUNCTIONS, | 502 | acpi_ut_debug_print(ACPI_LV_FUNCTIONS, |
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 6175ca5d73bf..f34be6773556 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c | |||
@@ -1020,7 +1020,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, | |||
1020 | ******************************************************************************/ | 1020 | ******************************************************************************/ |
1021 | 1021 | ||
1022 | void ACPI_INTERNAL_VAR_XFACE | 1022 | void ACPI_INTERNAL_VAR_XFACE |
1023 | acpi_ut_error(char *module_name, u32 line_number, char *format, ...) | 1023 | acpi_ut_error(const char *module_name, u32 line_number, const char *format, ...) |
1024 | { | 1024 | { |
1025 | va_list args; | 1025 | va_list args; |
1026 | 1026 | ||
@@ -1033,8 +1033,8 @@ acpi_ut_error(char *module_name, u32 line_number, char *format, ...) | |||
1033 | } | 1033 | } |
1034 | 1034 | ||
1035 | void ACPI_INTERNAL_VAR_XFACE | 1035 | void ACPI_INTERNAL_VAR_XFACE |
1036 | acpi_ut_exception(char *module_name, | 1036 | acpi_ut_exception(const char *module_name, |
1037 | u32 line_number, acpi_status status, char *format, ...) | 1037 | u32 line_number, acpi_status status, const char *format, ...) |
1038 | { | 1038 | { |
1039 | va_list args; | 1039 | va_list args; |
1040 | 1040 | ||
@@ -1050,7 +1050,8 @@ acpi_ut_exception(char *module_name, | |||
1050 | EXPORT_SYMBOL(acpi_ut_exception); | 1050 | EXPORT_SYMBOL(acpi_ut_exception); |
1051 | 1051 | ||
1052 | void ACPI_INTERNAL_VAR_XFACE | 1052 | void ACPI_INTERNAL_VAR_XFACE |
1053 | acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) | 1053 | acpi_ut_warning(const char *module_name, |
1054 | u32 line_number, const char *format, ...) | ||
1054 | { | 1055 | { |
1055 | va_list args; | 1056 | va_list args; |
1056 | 1057 | ||
@@ -1063,7 +1064,7 @@ acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) | |||
1063 | } | 1064 | } |
1064 | 1065 | ||
1065 | void ACPI_INTERNAL_VAR_XFACE | 1066 | void ACPI_INTERNAL_VAR_XFACE |
1066 | acpi_ut_info(char *module_name, u32 line_number, char *format, ...) | 1067 | acpi_ut_info(const char *module_name, u32 line_number, const char *format, ...) |
1067 | { | 1068 | { |
1068 | va_list args; | 1069 | va_list args; |
1069 | 1070 | ||
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index ede6a80837df..e25484495e65 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -83,7 +83,8 @@ acpi_ut_get_element_length(u8 object_type, | |||
83 | * | 83 | * |
84 | ******************************************************************************/ | 84 | ******************************************************************************/ |
85 | 85 | ||
86 | union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, | 86 | union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char |
87 | *module_name, | ||
87 | u32 line_number, | 88 | u32 line_number, |
88 | u32 component_id, | 89 | u32 component_id, |
89 | acpi_object_type | 90 | acpi_object_type |
@@ -347,7 +348,7 @@ u8 acpi_ut_valid_internal_object(void *object) | |||
347 | * | 348 | * |
348 | ******************************************************************************/ | 349 | ******************************************************************************/ |
349 | 350 | ||
350 | void *acpi_ut_allocate_object_desc_dbg(char *module_name, | 351 | void *acpi_ut_allocate_object_desc_dbg(const char *module_name, |
351 | u32 line_number, u32 component_id) | 352 | u32 line_number, u32 component_id) |
352 | { | 353 | { |
353 | union acpi_operand_object *object; | 354 | union acpi_operand_object *object; |