diff options
author | Lv Zheng <lv.zheng@intel.com> | 2013-10-28 21:30:16 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-10-31 09:35:43 -0400 |
commit | 4506bf2329cab39d41f027cdccb1cf455de2bf79 (patch) | |
tree | 1a528e4514f9eff4548fe1d0d241a501d9ae1e4b /include/acpi/acpixf.h | |
parent | d21f600b0e4d5a694a338688e61d95f08dbf0afb (diff) |
ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro
The following build error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC arch/x86/kernel/setup.o
In file included from include/acpi/acpi.h:64:0,
from include/linux/iscsi_ibft.h:24,
from arch/x86/kernel/setup.c:43:
include/acpi/acpixf.h:543:1: error: expected ',' or ';' before '{' token
include/acpi/acpixf.h:540:1: warning: 'acpi_error' declared 'static' but never defined [-Wunused-function]
make[2]: *** [arch/x86/kernel/setup.o] Error 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can be triggerred by the following stub function (if implemented):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
static inline void ACPI_INTERNAL_VAR_XFACE
acpi_error(const char *module_name,
u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3)
{
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This patch changes the position of ACPI_PRINTF_LIKE(x) to follow the
style of __printf(x, x+1) used in Linux to prevent such issues from
happening. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/acpixf.h')
-rw-r--r-- | include/acpi/acpixf.h | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index ddde61b43041..9759bd5f4777 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -530,50 +530,53 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
530 | /* | 530 | /* |
531 | * Error/Warning output | 531 | * Error/Warning output |
532 | */ | 532 | */ |
533 | ACPI_PRINTF_LIKE(3) | ||
533 | void ACPI_INTERNAL_VAR_XFACE | 534 | void ACPI_INTERNAL_VAR_XFACE |
534 | acpi_error(const char *module_name, | 535 | acpi_error(const char *module_name, u32 line_number, const char *format, ...); |
535 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
536 | 536 | ||
537 | ACPI_PRINTF_LIKE(4) | ||
537 | void ACPI_INTERNAL_VAR_XFACE | 538 | void ACPI_INTERNAL_VAR_XFACE |
538 | acpi_exception(const char *module_name, | 539 | acpi_exception(const char *module_name, |
539 | u32 line_number, | 540 | u32 line_number, acpi_status status, const char *format, ...); |
540 | acpi_status status, const char *format, ...) ACPI_PRINTF_LIKE(4); | ||
541 | 541 | ||
542 | ACPI_PRINTF_LIKE(3) | ||
542 | void ACPI_INTERNAL_VAR_XFACE | 543 | void ACPI_INTERNAL_VAR_XFACE |
543 | acpi_warning(const char *module_name, | 544 | acpi_warning(const char *module_name, u32 line_number, const char *format, ...); |
544 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
545 | 545 | ||
546 | ACPI_PRINTF_LIKE(3) | ||
546 | void ACPI_INTERNAL_VAR_XFACE | 547 | void ACPI_INTERNAL_VAR_XFACE |
547 | acpi_info(const char *module_name, | 548 | acpi_info(const char *module_name, u32 line_number, const char *format, ...); |
548 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | ||
549 | 549 | ||
550 | ACPI_PRINTF_LIKE(3) | ||
550 | void ACPI_INTERNAL_VAR_XFACE | 551 | void ACPI_INTERNAL_VAR_XFACE |
551 | acpi_bios_error(const char *module_name, | 552 | acpi_bios_error(const char *module_name, |
552 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | 553 | u32 line_number, const char *format, ...); |
553 | 554 | ||
555 | ACPI_PRINTF_LIKE(3) | ||
554 | void ACPI_INTERNAL_VAR_XFACE | 556 | void ACPI_INTERNAL_VAR_XFACE |
555 | acpi_bios_warning(const char *module_name, | 557 | acpi_bios_warning(const char *module_name, |
556 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | 558 | u32 line_number, const char *format, ...); |
557 | 559 | ||
558 | /* | 560 | /* |
559 | * Debug output | 561 | * Debug output |
560 | */ | 562 | */ |
561 | #ifdef ACPI_DEBUG_OUTPUT | 563 | #ifdef ACPI_DEBUG_OUTPUT |
562 | 564 | ||
565 | ACPI_PRINTF_LIKE(6) | ||
563 | void ACPI_INTERNAL_VAR_XFACE | 566 | void ACPI_INTERNAL_VAR_XFACE |
564 | acpi_debug_print(u32 requested_debug_level, | 567 | acpi_debug_print(u32 requested_debug_level, |
565 | u32 line_number, | 568 | u32 line_number, |
566 | const char *function_name, | 569 | const char *function_name, |
567 | const char *module_name, | 570 | const char *module_name, |
568 | u32 component_id, const char *format, ...) ACPI_PRINTF_LIKE(6); | 571 | u32 component_id, const char *format, ...); |
569 | 572 | ||
573 | ACPI_PRINTF_LIKE(6) | ||
570 | void ACPI_INTERNAL_VAR_XFACE | 574 | void ACPI_INTERNAL_VAR_XFACE |
571 | acpi_debug_print_raw(u32 requested_debug_level, | 575 | acpi_debug_print_raw(u32 requested_debug_level, |
572 | u32 line_number, | 576 | u32 line_number, |
573 | const char *function_name, | 577 | const char *function_name, |
574 | const char *module_name, | 578 | const char *module_name, |
575 | u32 component_id, | 579 | u32 component_id, const char *format, ...); |
576 | const char *format, ...) ACPI_PRINTF_LIKE(6); | ||
577 | #endif | 580 | #endif |
578 | 581 | ||
579 | #endif /* __ACXFACE_H__ */ | 582 | #endif /* __ACXFACE_H__ */ |