From: Meng Shao Liu Date: Wed, 16 Jul 2025 06:46:29 +0000 (+0800) Subject: samples/kobject: make attribute_group const X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f751fe2a2acbe8cc20da35f118f589ac3b316b78;p=thirdparty%2Fkernel%2Fstable.git samples/kobject: make attribute_group const The attr_group structures are allocated once and never modified at runtime. Also to match the const‑qualified parameter of sysfs_create_group(). Signed-off-by: Meng Shao Liu Link: https://lore.kernel.org/r/dc94227eaf337a2b92ab77dffa0da9f7f1f84c4e.1752646650.git.sau525@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c index e6d7fc18e433..36d87ca0bee2 100644 --- a/samples/kobject/kobject-example.c +++ b/samples/kobject/kobject-example.c @@ -102,7 +102,7 @@ static struct attribute *attrs[] = { * created for the attributes with the directory being the name of the * attribute group. */ -static struct attribute_group attr_group = { +static const struct attribute_group attr_group = { .attrs = attrs, };