public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nathan Chancellor <natechancellor@gmail.com>
Subject: [PATCH] ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode
Date: Thu, 20 Dec 2018 12:38:56 -0700	[thread overview]
Message-ID: <20181220193856.7833-1-natechancellor@gmail.com> (raw)

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>
---
 drivers/acpi/tables.c | 2 ++
 1 file changed, 2 insertions(+)

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,
 					  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,
-- 
2.20.1


             reply	other threads:[~2018-12-20 19:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 19:38 Nathan Chancellor [this message]
2018-12-20 21:57 ` [PATCH] ACPI / tables: Add an ifdef around amlcode and dsdt_amlcode Nathan Chancellor
2018-12-21 17:55   ` Nick Desaulniers
2018-12-21 11:16 ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181220193856.7833-1-natechancellor@gmail.com \
    --to=natechancellor@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox