[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0631f7fb-423a-40a8-a6c1-1f307c1efe96@suse.com>
Date: Thu, 13 Feb 2025 16:57:36 +0100
From: Petr Pavlu <petr.pavlu@...e.com>
To: Shyam Saini <shyamsaini@...ux.microsoft.com>
Cc: linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org,
code@...icks.com, linux@...musvillemoes.dk, christophe.leroy@...roup.eu,
hch@...radead.org, mcgrof@...nel.org, frkaya@...ux.microsoft.com,
vijayb@...ux.microsoft.com, petr.pavlu@...e.com, linux@...ssschuh.net,
samitolvanen@...gle.com, da.gomez@...sung.com, gregkh@...uxfoundation.org,
rafael@...nel.org, dakr@...nel.org
Subject: Re: [PATCH v3 1/4] kernel: param: rename locate_module_kobject
On 2/11/25 22:48, Shyam Saini wrote:
> The locate_module_kobject() function looks up an existing
> module_kobject for a given module name. If it cannot find the
> corresponding module_kobject, it creates one for the given name.
>
> This commit renames locate_module_kobject() to
> lookup_or_create_module_kobject() to better describe its operations.
>
> This doesn't change anything functionality wise.
>
> Suggested-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> Signed-off-by: Shyam Saini <shyamsaini@...ux.microsoft.com>
> ---
> kernel/params.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/params.c b/kernel/params.c
> index 0074d29c9b80..4b43baaf7c83 100644
> --- a/kernel/params.c
> +++ b/kernel/params.c
> @@ -763,7 +763,7 @@ void destroy_params(const struct kernel_param *params, unsigned num)
> params[i].ops->free(params[i].arg);
> }
>
> -static struct module_kobject * __init locate_module_kobject(const char *name)
> +static struct module_kobject * __init lookup_or_create_module_kobject(const char *name)
> {
> struct module_kobject *mk;
> struct kobject *kobj;
> @@ -805,10 +805,9 @@ static void __init kernel_add_sysfs_param(const char *name,
> struct module_kobject *mk;
> int err;
>
> - mk = locate_module_kobject(name);
> + mk = lookup_or_create_module_kobject(name);
> if (!mk)
> return;
> -
> /* We need to remove old parameters before adding more. */
> if (mk->mp)
> sysfs_remove_group(&mk->kobj, &mk->mp->grp);
Nit: Please restore the accidentally removed empty line.
--
Thanks,
Petr
Powered by blists - more mailing lists