From 3e13b7a465ea90713dee9e359f6c1a1a6d979043 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Tue, 11 Jun 2019 22:30:10 +0800 Subject: [PATCH] ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode mainline inclusion from mainline-5.0-rc1 commit 1f000e1bfff42e960e5d4562213a95016acc712f category: bugfix bugzilla: 16016 CVE: NA ------------------------------------------------- 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 Signed-off-by: Rafael J. Wysocki (cherry picked from commit 1f000e1bfff42e960e5d4562213a95016acc712f) Signed-off-by: Kefeng Wang Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- drivers/acpi/tables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 55361686ef04..7231b8dccbc6 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -713,8 +713,10 @@ acpi_os_physical_table_override(struct acpi_table_header *existing_table, table_length); } +#ifdef CONFIG_ACPI_CUSTOM_DSDT static void *amlcode __attribute__ ((weakref("AmlCode"))); static void *dsdt_amlcode __attribute__ ((weakref("dsdt_aml_code"))); +#endif acpi_status acpi_os_table_override(struct acpi_table_header *existing_table, -- GitLab