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]
Date: Fri, 7 Jun 2024 21:00:29 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Erick Archer <erick.archer@...look.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano <daniel.lezcano@...aro.org>, 
	Zhang Rui <rui.zhang@...el.com>, Lukasz Luba <lukasz.luba@....com>, 
	srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>, 
	Uwe Kleine-König <u.kleine-koenig@...gutronix.de>, 
	Ard Biesheuvel <ardb@...nel.org>, Sumeet Pawnikar <sumeet.r.pawnikar@...el.com>, 
	Lukas Wunner <lukas@...ner.de>, Kees Cook <keescook@...omium.org>, 
	"Gustavo A. R. Silva" <gustavoars@...nel.org>, Justin Stitt <justinstitt@...gle.com>, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] thermal: int3400: Use sizeof(*pointer) instead of sizeof(type)

On Thu, Jun 6, 2024 at 7:21 PM Erick Archer <erick.archer@...look.com> wrote:
>
> It is preferred to use sizeof(*pointer) instead of sizeof(type)
> due to the type of the variable can change and one needs not
> change the former (unlike the latter). This patch has no effect
> on runtime behavior.
>
> Signed-off-by: Erick Archer <erick.archer@...look.com>
> ---
>  drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> index fa96972266e4..b0c0f0ffdcb0 100644
> --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c
> @@ -571,7 +571,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
>         if (!adev)
>                 return -ENODEV;
>
> -       priv = kzalloc(sizeof(struct int3400_thermal_priv), GFP_KERNEL);
> +       priv = kzalloc(sizeof(*priv), GFP_KERNEL);
>         if (!priv)
>                 return -ENOMEM;
>
> --

Applied as 6.11 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ