summaryrefslogtreecommitdiffstats
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-21 10:46:46 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-22 17:34:43 +0100
commit542aa24646ca20ccedb70829a95254ce602cdcbd (patch)
treefecb4626fdce26a89f5eb0eb7b676b8cfb020e3f /include/linux/kobject.h
parent02a476d932287cf3096f78962ccb70d94d6203c6 (diff)
downloadlinux-542aa24646ca20ccedb70829a95254ce602cdcbd.tar.bz2
kobject: make kobject_namespace take a const *
kobject_namespace() should take a const *kobject as it does not modify the kobject passed to it. Change that, and the functions kobj_child_ns_ops() and kobj_ns_ops() needed to also be changed to const *. Acked-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/20221121094649.1556002-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index d978dbceb50d..5a2d58e10bf5 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -112,7 +112,7 @@ extern struct kobject * __must_check kobject_get_unless_zero(
struct kobject *kobj);
extern void kobject_put(struct kobject *kobj);
-extern const void *kobject_namespace(struct kobject *kobj);
+extern const void *kobject_namespace(const struct kobject *kobj);
extern void kobject_get_ownership(const struct kobject *kobj,
kuid_t *uid, kgid_t *gid);
extern char *kobject_get_path(const struct kobject *kobj, gfp_t flag);