Skip to contentSkip to conversation

irqchip/mbigen: fix compile warning when CONFIG_ACPI is disabled

PATCH Applied Yang Yingliang 3 participants 4 messages May 19, 2021 – Jun 6, 2021 irqchip drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irqchip/mbigen: fix compile warning when CONFIG_ACPI is disabled

Fix the following compile warning:

drivers/irqchip/irq-mbigen.c:372:36: warning: ‘mbigen_acpi_match’ defined but not used [-Wunused-const-variable=]
static const struct acpi_device_id mbigen_acpi_match[] = {

---
 drivers/irqchip/irq-mbigen.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/irqchip/irq-mbigen.c +6 -6
index 2cb45c6b8501..f565317a3da3 100644
@@ -273,6 +273,12 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
 }
 
 #ifdef CONFIG_ACPI
+static const struct acpi_device_id mbigen_acpi_match[] = {
+	{ "HISI0152", 0 },
+	{}
+};
+MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
+
 static int mbigen_acpi_create_domain(struct platform_device *pdev,
 				     struct mbigen_device *mgn_chip)
 {
@@ -369,12 +375,6 @@ static const struct of_device_id mbigen_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mbigen_of_match);
 
-static const struct acpi_device_id mbigen_acpi_match[] = {
-	{ "HISI0152", 0 },
-	{}
-};
-MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
-
 static struct platform_driver mbigen_platform_driver = {
 	.driver = {
 		.name		= "Hisilicon MBIGEN-V2",
Signature · 1 line
2.25.1
#1 lore raw
Quoted 42 lines · Yang Yingliang

Fix the following compile warning:

drivers/irqchip/irq-mbigen.c:372:36: warning: ‘mbigen_acpi_match’
defined but not used [-Wunused-const-variable=]
static const struct acpi_device_id mbigen_acpi_match[] = {

---
 drivers/irqchip/irq-mbigen.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/irqchip/irq-mbigen.c +6 -0
index 2cb45c6b8501..f565317a3da3 100644
@@ -273,6 +273,12 @@ static int mbigen_of_create_domain(struct
 platform_device *pdev,
 }
 
 #ifdef CONFIG_ACPI
+static const struct acpi_device_id mbigen_acpi_match[] = {
+	{ "HISI0152", 0 },
+	{}
+};
+MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
+
 static int mbigen_acpi_create_domain(struct platform_device *pdev,
 				     struct mbigen_device *mgn_chip)

{

drivers/irqchip/irq-mbigen.c +0 -6
@@ -369,12 +375,6 @@ static const struct of_device_id mbigen_of_match[] 
 = {
 };
 MODULE_DEVICE_TABLE(of, mbigen_of_match);
 
-static const struct acpi_device_id mbigen_acpi_match[] = {
-	{ "HISI0152", 0 },
-	{}
-};
-MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
-
 static struct platform_driver mbigen_platform_driver = {
 	.driver = {
Quoted 1 line

.name = "Hisilicon MBIGEN-V2",

Is it actually a thing to have mbigen without ACPI? As far as I can tell, all the mbigen-equipped machines in existence use ACPI.

Thanks,

        M.
Signature · 1 line
Jazz is not dead. It just smells funny...
#2 lore raw
Quoted 35 lines · Marc Zyngier
Quoted 34 lines · Yang Yingliang

Fix the following compile warning:

  drivers/irqchip/irq-mbigen.c:372:36: warning: ‘mbigen_acpi_match’ defined but not used [-Wunused-const-variable=]
   static const struct acpi_device_id mbigen_acpi_match[] = {

---
 drivers/irqchip/irq-mbigen.c | 12 ++++++------

 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/irqchip/irq-mbigen.c +6 -0
index 2cb45c6b8501..f565317a3da3 100644
@@ -273,6 +273,12 @@ static int mbigen_of_create_domain(struct
 platform_device *pdev,
  }
 
  #ifdef CONFIG_ACPI
+static const struct acpi_device_id mbigen_acpi_match[] = {
+    { "HISI0152", 0 },
+    {}
+};
+MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
+
  static int mbigen_acpi_create_domain(struct platform_device *pdev,
                       struct mbigen_device *mgn_chip)

 {

drivers/irqchip/irq-mbigen.c +0 -0
@@ -369,12 +375,6 @@ static const struct of_device_id 
 mbigen_of_match[] = {
  };
  MODULE_DEVICE_TABLE(of, mbigen_of_match);
 
Quoted 12 lines
Quoted 9 lines
drivers/irqchip/irq-mbigen.c +0 -6
-static const struct acpi_device_id mbigen_acpi_match[] = {
-    { "HISI0152", 0 },
-    {}
-};
-MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
-
  static struct platform_driver mbigen_platform_driver = {
      .driver = {

         .name        = "Hisilicon MBIGEN-V2",

Is it actually a thing to have mbigen without ACPI? As far as I can tell, all the mbigen-equipped machines in existence use ACPI.

We also use mbigen on embedded board that uses device tree, and mbigen driver already support device tree mode.

Thanks,

Yang

Quoted 4 lines

Thanks,

        M.

#3 lore raw

[irqchip: irq/irqchip-next] irqchip/mbigen: Fix compile warning when CONFIG_ACPI is disabled

In reply to Yang Yingliang
The following commit has been merged into the irq/irqchip-next branch of irqchip:

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     c96d6abbec52d6723bef6b50846f40f7fb27e93c
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/c96d6abbec52d6723bef6b50846f40f7fb27e93c
Author:        Yang Yingliang <[email protected]>
AuthorDate:    Wed, 19 May 2021 13:04:55 +08:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Sun, 06 Jun 2021 13:59:09 +01:00

irqchip/mbigen: Fix compile warning when CONFIG_ACPI is disabled

Fix the following compile warning:

drivers/irqchip/irq-mbigen.c:372:36: warning: ‘mbigen_acpi_match’ defined but not used [-Wunused-const-variable=]
static const struct acpi_device_id mbigen_acpi_match[] = {

---
 drivers/irqchip/irq-mbigen.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/irqchip/irq-mbigen.c +6 -6
index 2cb45c6..f565317 100644
@@ -273,6 +273,12 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
 }
 
 #ifdef CONFIG_ACPI
+static const struct acpi_device_id mbigen_acpi_match[] = {
+	{ "HISI0152", 0 },
+	{}
+};
+MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
+
 static int mbigen_acpi_create_domain(struct platform_device *pdev,
 				     struct mbigen_device *mgn_chip)
 {
@@ -369,12 +375,6 @@ static const struct of_device_id mbigen_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, mbigen_of_match);
 
-static const struct acpi_device_id mbigen_acpi_match[] = {
-	{ "HISI0152", 0 },
-	{}
-};
-MODULE_DEVICE_TABLE(acpi, mbigen_acpi_match);
-
 static struct platform_driver mbigen_platform_driver = {
 	.driver = {
 		.name		= "Hisilicon MBIGEN-V2",