diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-12-20 14:38:56 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-12-20 15:37:28 -0500 |
commit | 1f000e1bfff42e960e5d4562213a95016acc712f (patch) | |
tree | 8eff0fa90a96640939d37951eae21804d43daa28 /drivers/acpi/tables.c | |
parent | 82e4eb4e96539c76518425a5b5a6c56fa400bce3 (diff) |
ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode
Clang warns:
drivers/acpi/tables.c:715:14: warning: unused variable 'amlcode'
[-Wunused-variable]
static void *amlcode __attribute__ ((weakref("AmlCode")));
^
drivers/acpi/tables.c:716:14: warning: unused variable 'dsdt_amlcode'
[-Wunused-variable]
static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code")));
^
2 warnings generated.
The only uses of these variables are hiddem behind CONFIG_ACPI_CUSTOM_DSDT
so do the same thing here.
Fixes: 82e4eb4e9653 (ACPI / tables: add DSDT AmlCode new declaration name support)
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/tables.c')
-rw-r--r-- | drivers/acpi/tables.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index ccb90eff00e5..48eabb6c2d4f 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c | |||
@@ -712,8 +712,10 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table, | |||
712 | table_length); | 712 | table_length); |
713 | } | 713 | } |
714 | 714 | ||
715 | #ifdef CONFIG_ACPI_CUSTOM_DSDT | ||
715 | static void *amlcode __attribute__ ((weakref("AmlCode"))); | 716 | static void *amlcode __attribute__ ((weakref("AmlCode"))); |
716 | static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); | 717 | static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); |
718 | #endif | ||
717 | 719 | ||
718 | acpi_status | 720 | acpi_status |
719 | acpi_os_table_override(struct acpi_table_header *existing_table, | 721 | acpi_os_table_override(struct acpi_table_header *existing_table, |