diff options
| author | Can Peng <pengcan@kylinos.cn> | 2025-12-09 10:27:57 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2026-01-07 22:37:54 +0300 |
| commit | b0c8ac52da5a1c00bb9ffdc231cbf2222297688d (patch) | |
| tree | b88c70f360bd1ba472511f59be0e4cfec3594509 | |
| parent | 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb (diff) | |
| download | linux-b0c8ac52da5a1c00bb9ffdc231cbf2222297688d.tar.xz | |
ACPI: acpi_watchdog: use LIST_HEAD for stack-allocated list
Replace the separate declaration of 'resource_list' and subsequent
INIT_LIST_HEAD() call with LIST_HEAD(), which declares and initializes
the list head in one idiomatic step. This reduces code verbosity and
aligns with common kernel coding patterns, without functional change.
Signed-off-by: Can Peng <pengcan@kylinos.cn>
[ rjw: Subject edits ]
Link: https://patch.msgid.link/20251209072757.3110467-1-pengcan@kylinos.cn
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/acpi/acpi_watchdog.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c index 14b24157799c..709993c535d1 100644 --- a/drivers/acpi/acpi_watchdog.c +++ b/drivers/acpi/acpi_watchdog.c @@ -103,7 +103,7 @@ void __init acpi_watchdog_init(void) { const struct acpi_wdat_entry *entries; const struct acpi_table_wdat *wdat; - struct list_head resource_list; + LIST_HEAD(resource_list); struct resource_entry *rentry; struct platform_device *pdev; struct resource *resources; @@ -125,8 +125,6 @@ void __init acpi_watchdog_init(void) wdat->pci_device != 0xff || wdat->pci_function != 0xff) goto fail_put_wdat; - INIT_LIST_HEAD(&resource_list); - entries = (struct acpi_wdat_entry *)(wdat + 1); for (i = 0; i < wdat->entries; i++) { const struct acpi_generic_address *gas; |
