lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 03/34] platform: goldfish: remove ACPI_PTR() annotations
Date
From: Arnd Bergmann <arnd@arndb.de>

On platforms without ACPI support, this causes a W=1 warning from gcc when
the driver is built-in:

drivers/platform/goldfish/goldfish_pipe.c:925:36: warning: 'goldfish_pipe_acpi_match' defined but not used [-Wunused-const-variable=]
925 | static const struct acpi_device_id goldfish_pipe_acpi_match[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~

There is no real harm in just keeping the small table around, so rather
than adding more #ifdef checks, just reference it unconditionally to avoid
the warning.

Fixes: d62f324b0ac8 ("goldfish: Enable ACPI-based enumeration for android pipe")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/platform/goldfish/goldfish_pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 061aa9647c19..6a0a42887857 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -940,7 +940,7 @@ static struct platform_driver goldfish_pipe_driver = {
.driver = {
.name = "goldfish_pipe",
.of_match_table = goldfish_pipe_of_match,
- .acpi_match_table = ACPI_PTR(goldfish_pipe_acpi_match),
+ .acpi_match_table = goldfish_pipe_acpi_match,
}
};

--
2.39.2

\
 
 \ /
  Last update: 2024-05-27 16:20    [W:1.590 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site