Commit 0fe0bebf authored by Erik Schmauss's avatar Erik Schmauss Committed by Rafael J. Wysocki

ACPICA: macros: fix ACPI_ERROR_NAMESPACE macro

Fixing the ACPI_ERROR_NAMESPACE macros created an "unused variable"
compile error when ACPI_NO_ERROR_MESSAGES was defined. This commit
also fixes the above compilation errors by surrounding variables
meant for debugging inside a new ACPI_ERROR_ONLY macro.
Signed-off-by: default avatarErik Schmauss <erik.schmauss@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 34f206fd
...@@ -460,16 +460,18 @@ ...@@ -460,16 +460,18 @@
#define ACPI_WARN_PREDEFINED(plist) acpi_ut_predefined_warning plist #define ACPI_WARN_PREDEFINED(plist) acpi_ut_predefined_warning plist
#define ACPI_INFO_PREDEFINED(plist) acpi_ut_predefined_info plist #define ACPI_INFO_PREDEFINED(plist) acpi_ut_predefined_info plist
#define ACPI_BIOS_ERROR_PREDEFINED(plist) acpi_ut_predefined_bios_error plist #define ACPI_BIOS_ERROR_PREDEFINED(plist) acpi_ut_predefined_bios_error plist
#define ACPI_ERROR_ONLY(s) s
#else #else
/* No error messages */ /* No error messages */
#define ACPI_ERROR_NAMESPACE(s, e) #define ACPI_ERROR_NAMESPACE(s, p, e)
#define ACPI_ERROR_METHOD(s, n, p, e) #define ACPI_ERROR_METHOD(s, n, p, e)
#define ACPI_WARN_PREDEFINED(plist) #define ACPI_WARN_PREDEFINED(plist)
#define ACPI_INFO_PREDEFINED(plist) #define ACPI_INFO_PREDEFINED(plist)
#define ACPI_BIOS_ERROR_PREDEFINED(plist) #define ACPI_BIOS_ERROR_PREDEFINED(plist)
#define ACPI_ERROR_ONLY(s)
#endif /* ACPI_NO_ERROR_MESSAGES */ #endif /* ACPI_NO_ERROR_MESSAGES */
......
...@@ -443,10 +443,10 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, ...@@ -443,10 +443,10 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
struct acpi_gpe_event_info *gpe_event_info; struct acpi_gpe_event_info *gpe_event_info;
u32 gpe_enabled_count; u32 gpe_enabled_count;
u32 gpe_index; u32 gpe_index;
u32 gpe_number;
u32 i; u32 i;
u32 j; u32 j;
u8 *is_polling_needed = context; u8 *is_polling_needed = context;
ACPI_ERROR_ONLY(u32 gpe_number);
ACPI_FUNCTION_TRACE(ev_initialize_gpe_block); ACPI_FUNCTION_TRACE(ev_initialize_gpe_block);
...@@ -472,7 +472,9 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, ...@@ -472,7 +472,9 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
gpe_index = (i * ACPI_GPE_REGISTER_WIDTH) + j; gpe_index = (i * ACPI_GPE_REGISTER_WIDTH) + j;
gpe_event_info = &gpe_block->event_info[gpe_index]; gpe_event_info = &gpe_block->event_info[gpe_index];
gpe_number = gpe_block->block_base_number + gpe_index; ACPI_ERROR_ONLY(gpe_number =
gpe_block->block_base_number +
gpe_index);
gpe_event_info->flags |= ACPI_GPE_INITIALIZED; gpe_event_info->flags |= ACPI_GPE_INITIALIZED;
/* /*
......
...@@ -67,7 +67,7 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state); ...@@ -67,7 +67,7 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state);
static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state) static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state)
{ {
u32 aml_offset; ACPI_ERROR_ONLY(u32 aml_offset);
ACPI_FUNCTION_TRACE_PTR(ps_get_aml_opcode, walk_state); ACPI_FUNCTION_TRACE_PTR(ps_get_aml_opcode, walk_state);
...@@ -98,9 +98,11 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state) ...@@ -98,9 +98,11 @@ static acpi_status acpi_ps_get_aml_opcode(struct acpi_walk_state *walk_state)
/* The opcode is unrecognized. Complain and skip unknown opcodes */ /* The opcode is unrecognized. Complain and skip unknown opcodes */
if (walk_state->pass_number == 2) { if (walk_state->pass_number == 2) {
aml_offset = (u32)ACPI_PTR_DIFF(walk_state->aml, ACPI_ERROR_ONLY(aml_offset =
walk_state-> (u32)ACPI_PTR_DIFF(walk_state->aml,
parser_state.aml_start); walk_state->
parser_state.
aml_start));
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring", "Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",
......
...@@ -231,11 +231,11 @@ acpi_tb_install_standard_table(acpi_physical_address address, ...@@ -231,11 +231,11 @@ acpi_tb_install_standard_table(acpi_physical_address address,
void acpi_tb_override_table(struct acpi_table_desc *old_table_desc) void acpi_tb_override_table(struct acpi_table_desc *old_table_desc)
{ {
acpi_status status; acpi_status status;
char *override_type;
struct acpi_table_desc new_table_desc; struct acpi_table_desc new_table_desc;
struct acpi_table_header *table; struct acpi_table_header *table;
acpi_physical_address address; acpi_physical_address address;
u32 length; u32 length;
ACPI_ERROR_ONLY(char *override_type);
/* (1) Attempt logical override (returns a logical address) */ /* (1) Attempt logical override (returns a logical address) */
...@@ -244,7 +244,7 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc) ...@@ -244,7 +244,7 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc)
acpi_tb_acquire_temp_table(&new_table_desc, acpi_tb_acquire_temp_table(&new_table_desc,
ACPI_PTR_TO_PHYSADDR(table), ACPI_PTR_TO_PHYSADDR(table),
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL); ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL);
override_type = "Logical"; ACPI_ERROR_ONLY(override_type = "Logical");
goto finish_override; goto finish_override;
} }
...@@ -255,7 +255,7 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc) ...@@ -255,7 +255,7 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc)
if (ACPI_SUCCESS(status) && address && length) { if (ACPI_SUCCESS(status) && address && length) {
acpi_tb_acquire_temp_table(&new_table_desc, address, acpi_tb_acquire_temp_table(&new_table_desc, address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
override_type = "Physical"; ACPI_ERROR_ONLY(override_type = "Physical");
goto finish_override; goto finish_override;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment