Skip to content

Commit f95382d

Browse files
Min-Huactmarinas
authored andcommitted
acpi/arm64: remove unnecessary cast
DEFINE_RES_IRQ returns struct resource type, so it is unnecessary to cast it to struct resource. Remove the unnecessary cast to fix the following sparse warnings: drivers/acpi/arm64/gtdt.c:355:19: sparse: warning: cast to non-scalar drivers/acpi/arm64/gtdt.c:355:19: sparse: warning: cast from non-scalar No functional changes intended. Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com> Acked-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240917233827.73167-1-minhuadotchen@gmail.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent de7fb8d commit f95382d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/arm64/gtdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ static int __init gtdt_import_sbsa_gwdt(struct acpi_gtdt_watchdog *wd,
363363
}
364364

365365
irq = map_gt_gsi(wd->timer_interrupt, wd->timer_flags);
366-
res[2] = (struct resource)DEFINE_RES_IRQ(irq);
366+
res[2] = DEFINE_RES_IRQ(irq);
367367
if (irq <= 0) {
368368
pr_warn("failed to map the Watchdog interrupt.\n");
369369
nr_res--;

0 commit comments

Comments
 (0)