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: <2025062401-prenatal-hazily-7fc5@gregkh>
Date: Tue, 24 Jun 2025 16:47:49 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Zijun Hu <zijun_hu@...oud.com>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
	Zijun Hu <zijun.hu@....qualcomm.com>
Subject: Re: [PATCH 2/3] char: misc: Rename a local variable in misc_init()

On Fri, Jun 20, 2025 at 10:35:19PM +0800, Zijun Hu wrote:
> From: Zijun Hu <zijun.hu@....qualcomm.com>
> 
> Local variable @ret is not used for return value in misc_init().
> 
> Give it a different name @pde.
> 
> Signed-off-by: Zijun Hu <zijun.hu@....qualcomm.com>
> ---
>  drivers/char/misc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/char/misc.c b/drivers/char/misc.c
> index d5accc10a110098f7090dd0f900bc5fae5f75f74..f5ef8c175adb559e67dfe905d43d1404b249cc9e 100644
> --- a/drivers/char/misc.c
> +++ b/drivers/char/misc.c
> @@ -289,9 +289,9 @@ EXPORT_SYMBOL(misc_deregister);
>  static int __init misc_init(void)
>  {
>  	int err;
> -	struct proc_dir_entry *ret;
> +	struct proc_dir_entry *pde;

"pde" is an odd name.

> -	ret = proc_create_seq("misc", 0, NULL, &misc_seq_ops);
> +	pde = proc_create_seq("misc", 0, NULL, &misc_seq_ops);

Why not "misc_proc_file" as a better name?

>  	err = class_register(&misc_class);
>  	if (err)
>  		goto fail_remove;
> @@ -305,7 +305,7 @@ static int __init misc_init(void)
>  	pr_err("unable to get major %d for misc devices\n", MISC_MAJOR);
>  	class_unregister(&misc_class);
>  fail_remove:
> -	if (ret)
> +	if (pde)

Again, "pde" is a rough name, let's pick a better one please.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ