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: <e7632dd4-6009-53f3-e61a-ccb15d9f88f3@huawei.com>
Date: Sat, 19 Oct 2024 14:47:24 +0800
From: Hanjun Guo <guohanjun@...wei.com>
To: Min-Hua Chen <minhuadotchen@...il.com>, Lorenzo Pieralisi
	<lpieralisi@...nel.org>, Sudeep Holla <sudeep.holla@....com>, "Rafael J.
 Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>
CC: <linux-acpi@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] acpi/arm64: remove unnecessary cast

On 2024/9/18 7:38, Min-Hua Chen wrote:
> 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@...il.com>
> ---
>   drivers/acpi/arm64/gtdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/arm64/gtdt.c b/drivers/acpi/arm64/gtdt.c
> index c0e77c1c8e09..24bd479de91f 100644
> --- a/drivers/acpi/arm64/gtdt.c
> +++ b/drivers/acpi/arm64/gtdt.c
> @@ -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--;
> 

It's a minor issue, but I think it deserves a patch to make
the code cleaner,

Acked-by: Hanjun Guo <guohanjun@...wei.com>

Thanks
Hanjun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ