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: <49aa0662-ad1e-4d9f-b288-8f193c5241bd@kernel.org>
Date: Mon, 13 Oct 2025 13:53:00 -0500
From: Mario Limonciello <superm1@...nel.org>
To: Kuan-Wei Chiu <visitorckw@...il.com>
Cc: perry.yuan@....com, hansg@...nel.org, ilpo.jarvinen@...ux.intel.com,
 jserv@...s.ncku.edu.tw, platform-driver-x86@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] platform/x86/amd: hfi: Remove redundant assignment to
 .owner

On 10/11/25 1:38 AM, Kuan-Wei Chiu wrote:
> The coccicheck tool reports the following warning for this driver:
> 
> ./hfi.c:509:3-8: No need to set .owner here. The core will do it.
> 
> The manual assignment of .owner = THIS_MODULE; in the platform_driver
> struct is redundant. The platform_driver_register() function, which is
> called to register the driver, is a macro that automatically sets the
> driver's owner to THIS_MODULE.
> 
> The driver core handles this assignment internally, making the explicit
> initialization in the struct definition unnecessary. Remove the
> unnecessary line.
> 
> Signed-off-by: Kuan-Wei Chiu <visitorckw@...il.com>
> ---
> Build test only.

Reviewed-by: Mario Limonciello (AMD) <superm1@...nel.org>>
>   drivers/platform/x86/amd/hfi/hfi.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/amd/hfi/hfi.c b/drivers/platform/x86/amd/hfi/hfi.c
> index 5d5d2cf23a75..83863a5e0fbc 100644
> --- a/drivers/platform/x86/amd/hfi/hfi.c
> +++ b/drivers/platform/x86/amd/hfi/hfi.c
> @@ -505,7 +505,6 @@ static int amd_hfi_probe(struct platform_device *pdev)
>   static struct platform_driver amd_hfi_driver = {
>   	.driver = {
>   		.name = AMD_HFI_DRIVER,
> -		.owner = THIS_MODULE,
>   		.pm = &amd_hfi_pm_ops,
>   		.acpi_match_table = ACPI_PTR(amd_hfi_platform_match),
>   	},


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ