mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] goldfish: Fix unused const variable 'goldfish_pipe_acpi_match'
@ 2024-10-26  7:01 Zeng Heng
  2024-11-06 15:57 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Zeng Heng @ 2024-10-26  7:01 UTC (permalink / raw)
  To: gregkh, andriy.shevchenko, quic_jjohnson, jinqian, jia-cheng.hu,
	u.kleine-koenig, alan
  Cc: linux-kernel, bobo.shaobowang

Fix the following compilation warning:

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[] = {

The complexity of config guards needed for ACPI_PTR() is not worthwhile
for the small amount of saved data. So remove the use of ACPI_PTR instead
and drop now unneeded linux/acpi.h include.

Fixes: d62f324b0ac8 ("goldfish: Enable ACPI-based enumeration for android pipe")
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
---
 drivers/platform/goldfish/goldfish_pipe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index c2aab0cfab33..ca78e5833136 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -61,7 +61,6 @@
 #include <linux/io.h>
 #include <linux/dma-mapping.h>
 #include <linux/mm.h>
-#include <linux/acpi.h>
 #include <linux/bug.h>
 #include "goldfish_pipe_qemu.h"
 
@@ -940,7 +939,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.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-11-07  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-26  7:01 [PATCH v2] goldfish: Fix unused const variable 'goldfish_pipe_acpi_match' Zeng Heng
2024-11-06 15:57 ` Andy Shevchenko
2024-11-07  2:29   ` Zeng Heng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®