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 /include/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 'include/acpi')
-rw-r--r-- | include/acpi/acinterp.h | 5 | ||||
-rw-r--r-- | include/acpi/aclocal.h | 4 | ||||
-rw-r--r-- | include/acpi/acmacros.h | 2 | ||||
-rw-r--r-- | include/acpi/acnamesp.h | 20 | ||||
-rw-r--r-- | include/acpi/acutils.h | 66 |
5 files changed, 55 insertions, 42 deletions
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index e249ce5d3300..accd1208dfe3 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -367,9 +367,10 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth); | |||
367 | void | 367 | void |
368 | acpi_ex_dump_operands(union acpi_operand_object **operands, | 368 | acpi_ex_dump_operands(union acpi_operand_object **operands, |
369 | acpi_interpreter_mode interpreter_mode, | 369 | acpi_interpreter_mode interpreter_mode, |
370 | char *ident, | 370 | const char *ident, |
371 | u32 num_levels, | 371 | u32 num_levels, |
372 | char *note, char *module_name, u32 line_number); | 372 | const char *note, |
373 | const char *module_name, u32 line_number); | ||
373 | 374 | ||
374 | #ifdef ACPI_FUTURE_USAGE | 375 | #ifdef ACPI_FUTURE_USAGE |
375 | void | 376 | void |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 62d7468ed3f9..b221c8583ddd 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -282,8 +282,8 @@ struct acpi_predefined_names { | |||
282 | /* Info structure used to convert external<->internal namestrings */ | 282 | /* Info structure used to convert external<->internal namestrings */ |
283 | 283 | ||
284 | struct acpi_namestring_info { | 284 | struct acpi_namestring_info { |
285 | char *external_name; | 285 | const char *external_name; |
286 | char *next_external_char; | 286 | const char *next_external_char; |
287 | char *internal_name; | 287 | char *internal_name; |
288 | u32 length; | 288 | u32 length; |
289 | u32 num_segments; | 289 | u32 num_segments; |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index d0494ea74b22..77439df4632b 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 const 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 |
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index d622c309002e..9ed70a050580 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h | |||
@@ -199,7 +199,7 @@ acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for); | |||
199 | 199 | ||
200 | acpi_status | 200 | acpi_status |
201 | acpi_ns_get_node(struct acpi_namespace_node *prefix_node, | 201 | acpi_ns_get_node(struct acpi_namespace_node *prefix_node, |
202 | char *external_pathname, | 202 | const char *external_pathname, |
203 | u32 flags, struct acpi_namespace_node **out_node); | 203 | u32 flags, struct acpi_namespace_node **out_node); |
204 | 204 | ||
205 | acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node); | 205 | acpi_size acpi_ns_get_pathname_length(struct acpi_namespace_node *node); |
@@ -263,28 +263,30 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node); | |||
263 | u32 acpi_ns_local(acpi_object_type type); | 263 | u32 acpi_ns_local(acpi_object_type type); |
264 | 264 | ||
265 | void | 265 | void |
266 | acpi_ns_report_error(char *module_name, | 266 | acpi_ns_report_error(const char *module_name, |
267 | u32 line_number, | 267 | u32 line_number, |
268 | char *internal_name, acpi_status lookup_status); | 268 | const char *internal_name, acpi_status lookup_status); |
269 | 269 | ||
270 | void | 270 | void |
271 | acpi_ns_report_method_error(char *module_name, | 271 | acpi_ns_report_method_error(const char *module_name, |
272 | u32 line_number, | 272 | u32 line_number, |
273 | char *message, | 273 | const char *message, |
274 | struct acpi_namespace_node *node, | 274 | struct acpi_namespace_node *node, |
275 | char *path, acpi_status lookup_status); | 275 | const char *path, acpi_status lookup_status); |
276 | 276 | ||
277 | void acpi_ns_print_node_pathname(struct acpi_namespace_node *node, char *msg); | 277 | void |
278 | acpi_ns_print_node_pathname(struct acpi_namespace_node *node, const char *msg); | ||
278 | 279 | ||
279 | acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info); | 280 | acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info); |
280 | 281 | ||
281 | void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info); | 282 | void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info); |
282 | 283 | ||
283 | acpi_status acpi_ns_internalize_name(char *dotted_name, char **converted_name); | 284 | acpi_status |
285 | acpi_ns_internalize_name(const char *dotted_name, char **converted_name); | ||
284 | 286 | ||
285 | acpi_status | 287 | acpi_status |
286 | acpi_ns_externalize_name(u32 internal_name_length, | 288 | acpi_ns_externalize_name(u32 internal_name_length, |
287 | char *internal_name, | 289 | const char *internal_name, |
288 | u32 * converted_name_length, char **converted_name); | 290 | u32 * converted_name_length, char **converted_name); |
289 | 291 | ||
290 | struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle); | 292 | struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle); |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index 3f663a0077be..69f8888771ff 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -245,41 +245,45 @@ void acpi_ut_track_stack_ptr(void); | |||
245 | 245 | ||
246 | void | 246 | void |
247 | acpi_ut_trace(u32 line_number, | 247 | acpi_ut_trace(u32 line_number, |
248 | const char *function_name, char *module_name, u32 component_id); | 248 | const char *function_name, |
249 | const char *module_name, u32 component_id); | ||
249 | 250 | ||
250 | void | 251 | void |
251 | acpi_ut_trace_ptr(u32 line_number, | 252 | acpi_ut_trace_ptr(u32 line_number, |
252 | const char *function_name, | 253 | const char *function_name, |
253 | char *module_name, u32 component_id, void *pointer); | 254 | const char *module_name, u32 component_id, void *pointer); |
254 | 255 | ||
255 | void | 256 | void |
256 | acpi_ut_trace_u32(u32 line_number, | 257 | acpi_ut_trace_u32(u32 line_number, |
257 | const char *function_name, | 258 | const char *function_name, |
258 | char *module_name, u32 component_id, u32 integer); | 259 | const char *module_name, u32 component_id, u32 integer); |
259 | 260 | ||
260 | void | 261 | void |
261 | acpi_ut_trace_str(u32 line_number, | 262 | acpi_ut_trace_str(u32 line_number, |
262 | const char *function_name, | 263 | const char *function_name, |
263 | char *module_name, u32 component_id, char *string); | 264 | const char *module_name, u32 component_id, char *string); |
264 | 265 | ||
265 | void | 266 | void |
266 | acpi_ut_exit(u32 line_number, | 267 | acpi_ut_exit(u32 line_number, |
267 | const char *function_name, char *module_name, u32 component_id); | 268 | const char *function_name, |
269 | const char *module_name, u32 component_id); | ||
268 | 270 | ||
269 | void | 271 | void |
270 | acpi_ut_status_exit(u32 line_number, | 272 | acpi_ut_status_exit(u32 line_number, |
271 | const char *function_name, | 273 | const char *function_name, |
272 | char *module_name, u32 component_id, acpi_status status); | 274 | const char *module_name, |
275 | u32 component_id, acpi_status status); | ||
273 | 276 | ||
274 | void | 277 | void |
275 | acpi_ut_value_exit(u32 line_number, | 278 | acpi_ut_value_exit(u32 line_number, |
276 | const char *function_name, | 279 | const char *function_name, |
277 | char *module_name, u32 component_id, acpi_integer value); | 280 | const char *module_name, |
281 | u32 component_id, acpi_integer value); | ||
278 | 282 | ||
279 | void | 283 | void |
280 | acpi_ut_ptr_exit(u32 line_number, | 284 | acpi_ut_ptr_exit(u32 line_number, |
281 | const char *function_name, | 285 | const char *function_name, |
282 | char *module_name, u32 component_id, u8 * ptr); | 286 | const char *module_name, u32 component_id, u8 *ptr); |
283 | 287 | ||
284 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 288 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); |
285 | 289 | ||
@@ -297,33 +301,35 @@ void ACPI_INTERNAL_VAR_XFACE | |||
297 | acpi_ut_debug_print(u32 requested_debug_level, | 301 | acpi_ut_debug_print(u32 requested_debug_level, |
298 | u32 line_number, | 302 | u32 line_number, |
299 | const char *function_name, | 303 | const char *function_name, |
300 | char *module_name, | 304 | const char *module_name, |
301 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); | 305 | u32 component_id, |
306 | const char *format, ...) ACPI_PRINTF_LIKE(6); | ||
302 | 307 | ||
303 | void ACPI_INTERNAL_VAR_XFACE | 308 | void ACPI_INTERNAL_VAR_XFACE |
304 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 309 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
305 | u32 line_number, | 310 | u32 line_number, |
306 | const char *function_name, | 311 | const char *function_name, |
307 | char *module_name, | 312 | const char *module_name, |
308 | u32 component_id, | 313 | u32 component_id, |
309 | char *format, ...) ACPI_PRINTF_LIKE(6); | 314 | const char *format, ...) ACPI_PRINTF_LIKE(6); |
310 | 315 | ||
311 | void ACPI_INTERNAL_VAR_XFACE | 316 | void ACPI_INTERNAL_VAR_XFACE |
312 | acpi_ut_error(char *module_name, | 317 | acpi_ut_error(const char *module_name, |
313 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | 318 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); |
314 | 319 | ||
315 | void ACPI_INTERNAL_VAR_XFACE | 320 | void ACPI_INTERNAL_VAR_XFACE |
316 | acpi_ut_exception(char *module_name, | 321 | acpi_ut_exception(const char *module_name, |
317 | u32 line_number, | 322 | u32 line_number, |
318 | acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); | 323 | acpi_status status, |
324 | const char *format, ...) ACPI_PRINTF_LIKE(4); | ||
319 | 325 | ||
320 | void ACPI_INTERNAL_VAR_XFACE | 326 | void ACPI_INTERNAL_VAR_XFACE |
321 | acpi_ut_warning(char *module_name, | 327 | acpi_ut_warning(const char *module_name, |
322 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | 328 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); |
323 | 329 | ||
324 | void ACPI_INTERNAL_VAR_XFACE | 330 | void ACPI_INTERNAL_VAR_XFACE |
325 | acpi_ut_info(char *module_name, | 331 | acpi_ut_info(const char *module_name, |
326 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | 332 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); |
327 | 333 | ||
328 | /* | 334 | /* |
329 | * utdelete - Object deletion and reference counts | 335 | * utdelete - Object deletion and reference counts |
@@ -376,13 +382,14 @@ acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); | |||
376 | /* | 382 | /* |
377 | * utobject - internal object create/delete/cache routines | 383 | * utobject - internal object create/delete/cache routines |
378 | */ | 384 | */ |
379 | union acpi_operand_object *acpi_ut_create_internal_object_dbg(char *module_name, | 385 | union acpi_operand_object *acpi_ut_create_internal_object_dbg(const char |
386 | *module_name, | ||
380 | u32 line_number, | 387 | u32 line_number, |
381 | u32 component_id, | 388 | u32 component_id, |
382 | acpi_object_type | 389 | acpi_object_type |
383 | type); | 390 | type); |
384 | 391 | ||
385 | void *acpi_ut_allocate_object_desc_dbg(char *module_name, | 392 | void *acpi_ut_allocate_object_desc_dbg(const char *module_name, |
386 | u32 line_number, u32 component_id); | 393 | u32 line_number, u32 component_id); |
387 | 394 | ||
388 | #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t) | 395 | #define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t) |
@@ -543,26 +550,29 @@ acpi_status | |||
543 | acpi_ut_initialize_buffer(struct acpi_buffer *buffer, | 550 | acpi_ut_initialize_buffer(struct acpi_buffer *buffer, |
544 | acpi_size required_length); | 551 | acpi_size required_length); |
545 | 552 | ||
546 | void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line); | 553 | void *acpi_ut_allocate(acpi_size size, |
554 | u32 component, const char *module, u32 line); | ||
547 | 555 | ||
548 | void *acpi_ut_allocate_zeroed(acpi_size size, | 556 | void *acpi_ut_allocate_zeroed(acpi_size size, |
549 | u32 component, char *module, u32 line); | 557 | u32 component, const char *module, u32 line); |
550 | 558 | ||
551 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | 559 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
552 | void *acpi_ut_allocate_and_track(acpi_size size, | 560 | void *acpi_ut_allocate_and_track(acpi_size size, |
553 | u32 component, char *module, u32 line); | 561 | u32 component, const char *module, u32 line); |
554 | 562 | ||
555 | void *acpi_ut_allocate_zeroed_and_track(acpi_size size, | 563 | void *acpi_ut_allocate_zeroed_and_track(acpi_size size, |
556 | u32 component, char *module, u32 line); | 564 | u32 component, |
565 | const char *module, u32 line); | ||
557 | 566 | ||
558 | void | 567 | void |
559 | acpi_ut_free_and_track(void *address, u32 component, char *module, u32 line); | 568 | acpi_ut_free_and_track(void *address, |
569 | u32 component, const char *module, u32 line); | ||
560 | 570 | ||
561 | #ifdef ACPI_FUTURE_USAGE | 571 | #ifdef ACPI_FUTURE_USAGE |
562 | void acpi_ut_dump_allocation_info(void); | 572 | void acpi_ut_dump_allocation_info(void); |
563 | #endif /* ACPI_FUTURE_USAGE */ | 573 | #endif /* ACPI_FUTURE_USAGE */ |
564 | 574 | ||
565 | void acpi_ut_dump_allocations(u32 component, char *module); | 575 | void acpi_ut_dump_allocations(u32 component, const char *module); |
566 | 576 | ||
567 | acpi_status | 577 | acpi_status |
568 | acpi_ut_create_list(char *list_name, | 578 | acpi_ut_create_list(char *list_name, |