Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kernel: param: rename locate_module_kobject

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@rasmusvillemoes.dk>
Signed-off-by: Shyam Saini <shyamsaini@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250227184930.34163-2-shyamsaini@linux.microsoft.com
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>

authored by

Shyam Saini and committed by
Petr Pavlu
bbc9462f 8ffd015d

+3 -3
+3 -3
kernel/params.c
··· 760 760 params[i].ops->free(params[i].arg); 761 761 } 762 762 763 - static struct module_kobject * __init locate_module_kobject(const char *name) 763 + static struct module_kobject * __init lookup_or_create_module_kobject(const char *name) 764 764 { 765 765 struct module_kobject *mk; 766 766 struct kobject *kobj; ··· 802 802 struct module_kobject *mk; 803 803 int err; 804 804 805 - mk = locate_module_kobject(name); 805 + mk = lookup_or_create_module_kobject(name); 806 806 if (!mk) 807 807 return; 808 808 ··· 873 873 int err; 874 874 875 875 for (vattr = __start___modver; vattr < __stop___modver; vattr++) { 876 - mk = locate_module_kobject(vattr->module_name); 876 + mk = lookup_or_create_module_kobject(vattr->module_name); 877 877 if (mk) { 878 878 err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr); 879 879 WARN_ON_ONCE(err);