summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/psobject.c
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2018-03-15 02:13:05 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-18 20:52:00 +0300
commit0fe0bebf5fb905ae682b1ecfd0b51b3a89e45ee6 (patch)
treed466b2bbeca9fcf3c076605a253c2906b8a9d5f6 /drivers/acpi/acpica/psobject.c
parent34f206fd757c5061a67d879a74c300fafc34defb (diff)
downloadlinux-0fe0bebf5fb905ae682b1ecfd0b51b3a89e45ee6.tar.xz
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: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/psobject.c')
-rw-r--r--drivers/acpi/acpica/psobject.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/psobject.c b/drivers/acpi/acpica/psobject.c
index b18f1e048985..70e3ea933edc 100644
--- a/drivers/acpi/acpica/psobject.c
+++ b/drivers/acpi/acpica/psobject.c
@@ -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)
{
- u32 aml_offset;
+ ACPI_ERROR_ONLY(u32 aml_offset);
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)
/* The opcode is unrecognized. Complain and skip unknown opcodes */
if (walk_state->pass_number == 2) {
- aml_offset = (u32)ACPI_PTR_DIFF(walk_state->aml,
- walk_state->
- parser_state.aml_start);
+ ACPI_ERROR_ONLY(aml_offset =
+ (u32)ACPI_PTR_DIFF(walk_state->aml,
+ walk_state->
+ parser_state.
+ aml_start));
ACPI_ERROR((AE_INFO,
"Unknown opcode 0x%.2X at table offset 0x%.4X, ignoring",