lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0g1dnFcgj45760QaREiX5DH-JyYeCug0LwYdb0RZF+sLA@mail.gmail.com>
Date: Wed, 7 Jan 2026 20:39:38 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Can Peng <pengcan@...inos.cn>
Cc: rafael@...nel.org, lenb@...nel.org, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] acpi: use LIST_HEAD for stack-allocated list in acpi_watchdog_init

On Tue, Dec 9, 2025 at 8:29 AM Can Peng <pengcan@...inos.cn> wrote:
>
> 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@...inos.cn>
> ---
>  drivers/acpi/acpi_watchdog.c | 4 +---
>  1 file changed, 1 insertion(+), 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;
> --

Applied as 6.20 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ