Skip to content

Commit 3b41b5e

Browse files
Shyam Sainigregkh
authored andcommitted
kernel: param: rename locate_module_kobject
[ Upstream commit bbc9462 ] 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 <[email protected]> Signed-off-by: Shyam Saini <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Pavlu <[email protected]> Stable-dep-of: f95bbfe ("drivers: base: handle module_kobject creation") Signed-off-by: Sasha Levin <[email protected]>
1 parent 7509810 commit 3b41b5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/params.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ void destroy_params(const struct kernel_param *params, unsigned num)
763763
params[i].ops->free(params[i].arg);
764764
}
765765

766-
static struct module_kobject * __init locate_module_kobject(const char *name)
766+
static struct module_kobject * __init lookup_or_create_module_kobject(const char *name)
767767
{
768768
struct module_kobject *mk;
769769
struct kobject *kobj;
@@ -805,7 +805,7 @@ static void __init kernel_add_sysfs_param(const char *name,
805805
struct module_kobject *mk;
806806
int err;
807807

808-
mk = locate_module_kobject(name);
808+
mk = lookup_or_create_module_kobject(name);
809809
if (!mk)
810810
return;
811811

@@ -876,7 +876,7 @@ static void __init version_sysfs_builtin(void)
876876
int err;
877877

878878
for (vattr = __start___modver; vattr < __stop___modver; vattr++) {
879-
mk = locate_module_kobject(vattr->module_name);
879+
mk = lookup_or_create_module_kobject(vattr->module_name);
880880
if (mk) {
881881
err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr);
882882
WARN_ON_ONCE(err);

0 commit comments

Comments
 (0)