[PATCH RFC 10/10] kobject: make struct kobject member default_groups a constant array

From: Heiner Kallweit

Date: Tue Feb 17 2026 - 17:33:29 EST


Constify the default_groups array, allowing to assign constant arrays.

Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
---
include/linux/kobject.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index c8219505a79..e45ee843931 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -116,7 +116,7 @@ char *kobject_get_path(const struct kobject *kobj, gfp_t flag);
struct kobj_type {
void (*release)(struct kobject *kobj);
const struct sysfs_ops *sysfs_ops;
- const struct attribute_group **default_groups;
+ const struct attribute_group *const *default_groups;
const struct kobj_ns_type_operations *(*child_ns_type)(const struct kobject *kobj);
const void *(*namespace)(const struct kobject *kobj);
void (*get_ownership)(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
--
2.53.0