Skip to contentSkip to conversation

acpi/arm64: Drop extra (struct resource)

PATCH In review Jonathan Cameron 3 participants 4 messages Mar 1, 2023 – Mar 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acpi/arm64: Drop extra (struct resource)

DEFINE_RES_IRQ() is a wrapper around the DEFINE_RES_NAMED() macro which already has the (struct resource) for the compound literal.

Fixes warnings:
CC drivers/acpi/arm64/gtdt.o
CHECK drivers/acpi/arm64/gtdt.c
drivers/acpi/arm64/gtdt.c:355:19: warning: cast to non-scalar drivers/acpi/arm64/gtdt.c:355:19: warning: cast from non-scalar

Fixes 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be compound literal")
---
 drivers/acpi/arm64/gtdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +1 -1
index c0e77c1c8e09..24bd479de91f 100644
@@ -352,7 +352,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
 	}
 
 	irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
-	res[2] = (struct resource)DEFINE_RES_IRQ(irq);
+	res[2] = DEFINE_RES_IRQ(irq);
 	if (irq <= 0) {
 		pr_warn("failed to map the Watchdog interrupt.\n");
 		nr_res--;
Signature · 1 line
2.37.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jonathan Cameron

DEFINE_RES_IRQ() is a wrapper around the DEFINE_RES_NAMED() macro which already has the (struct resource) for the compound literal.

Thank you!

Quoted 28 lines

Fixes warnings:
CC drivers/acpi/arm64/gtdt.o
CHECK drivers/acpi/arm64/gtdt.c
drivers/acpi/arm64/gtdt.c:355:19: warning: cast to non-scalar drivers/acpi/arm64/gtdt.c:355:19: warning: cast from non-scalar

Fixes 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be compound literal")
---
 drivers/acpi/arm64/gtdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +1 -1
index c0e77c1c8e09..24bd479de91f 100644
@@ -352,7 +352,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
 	}
 
 	irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
-	res[2] = (struct resource)DEFINE_RES_IRQ(irq);
+	res[2] = DEFINE_RES_IRQ(irq);
 	if (irq <= 0) {
 		pr_warn("failed to map the Watchdog interrupt.\n");
 		nr_res--;
Signature · 1 line
2.37.2
Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Jonathan Cameron
Quoted 22 lines · Jonathan Cameron

DEFINE_RES_IRQ() is a wrapper around the DEFINE_RES_NAMED() macro which already has the (struct resource) for the compound literal.

Fixes warnings:
CC drivers/acpi/arm64/gtdt.o
CHECK drivers/acpi/arm64/gtdt.c
drivers/acpi/arm64/gtdt.c:355:19: warning: cast to non-scalar drivers/acpi/arm64/gtdt.c:355:19: warning: cast from non-scalar

Fixes 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be compound literal")
---
  drivers/acpi/arm64/gtdt.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +0 -0
index c0e77c1c8e09..24bd479de91f 100644

drivers/acpi/arm64/gtdt.c static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd, · line 358

Quoted 8 lines
drivers/acpi/arm64/gtdt.c +1 -1
@@ -352,7 +352,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
  	}
 
  	irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
-	res[2] = (struct resource)DEFINE_RES_IRQ(irq);
+	res[2] = DEFINE_RES_IRQ(irq);
  	if (irq <= 0) {
  		pr_warn("failed to map the Watchdog interrupt.\n");
  		nr_res--;

Looks good to me,

maintainer
#3 lore raw

+Cc Catalin, and Lorenzo's kernel.org email.

Quoted 34 lines · Hanjun Guo
Quoted 22 lines · Jonathan Cameron

DEFINE_RES_IRQ() is a wrapper around the DEFINE_RES_NAMED() macro which already has the (struct resource) for the compound literal.

Fixes warnings:
   CC      drivers/acpi/arm64/gtdt.o
   CHECK   drivers/acpi/arm64/gtdt.c drivers/acpi/arm64/gtdt.c:355:19: warning: cast to non-scalar drivers/acpi/arm64/gtdt.c:355:19: warning: cast from non-scalar

Fixes 52c4d11f1dce ("resource: Convert DEFINE_RES_NAMED() to be compound literal")

---
  drivers/acpi/arm64/gtdt.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/arm64/gtdt.c +0 -0
index c0e77c1c8e09..24bd479de91f 100644

drivers/acpi/arm64/gtdt.c static int __init gtdt_import_sbsa_gwdt(struct · line 358

Quoted 8 lines
drivers/acpi/arm64/gtdt.c +1 -1
@@ -352,7 +352,7 @@ static int __init gtdt_import_sbsa_gwdt(struct 
 acpi_gtdt_watchdog *wd,
       }
       irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
-    res[2] = (struct resource)DEFINE_RES_IRQ(irq);
+    res[2] = DEFINE_RES_IRQ(irq);
       if (irq <= 0) {
           pr_warn("failed to map the Watchdog interrupt.\n");
           nr_res--;

Looks good to me,

Quoted 1 line

Catalin, would you mind picking this up for 6.3-rc? Andy also reviewed this patch [1].

[1]: https://www.spinics.net/lists/arm-kernel/msg1051744.html

Thanks
Hanjun