sh: sq: use default_groups in kobj_type
PATCH 1/1 sh: sq: use default_groups in kobj_type
There are currently 2 ways to create a set of sysfs files for a kobj_type, through the default_attrs field, and the default_groups field. Move the sh sq sysfs code to use default_groups field which has been the preferred way since aa30f47cf666 ("kobject: Add support for default attribute groups to kobj_type") so that we can soon get rid of the obsolete default_attrs field.
--- arch/sh/kernel/cpu/sh4/sq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/sh/kernel/cpu/sh4/sq.c +2 -1
@@ -324,6 +324,7 @@ static struct attribute *sq_sysfs_attrs[] = { &mapping_attr.attr,NULL , }; +ATTRIBUTE_GROUPS (sq_sysfs);static const struct sysfs_ops sq_sysfs_ops = { .show = sq_sysfs_show,
@@ -332,7 +333,7 @@ static const struct sysfs_ops sq_sysfs_ops = {static struct kobj_type ktype_percpu_entry = { .sysfs_ops = &sq_sysfs_ops, - .default_attrs = sq_sysfs_attrs, + .default_groups = sq_sysfs_groups, };static int sq_dev_add (struct device *dev,struct subsys_interface *sif)
Signature · 1 line
2.34.1
Quoted 6 lines · Greg Kroah-Hartman
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through thedefault_attrsfield, and thedefault_groupsfield. Move the sh sq sysfs code to usedefault_groupsfield which has been the preferred way sinceaa30f47cf666("kobject: Add support for default attribute groups tokobj_type") so that we can soon get rid of the obsoletedefault_attrsfield.
Let's see, sh4-specific, depends on CONFIG_SH_STORE_QUEUES... it built but I'm not finding an "sq" entry under /proc. (Or anything with "mapping" in it...)
Oh well, probably right? Didn't break anything for me:
Rob
Quoted 8 lines · Rob Landley
Quoted 6 lines · Greg Kroah-Hartman
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through thedefault_attrsfield, and thedefault_groupsfield. Move the sh sq sysfs code to usedefault_groupsfield which has been the preferred way sinceaa30f47cf666("kobject: Add support for default attribute groups tokobj_type") so that we can soon get rid of the obsoletedefault_attrsfield.
Quoted 6 lines
Let's see, sh4-specific, depends on
CONFIG_SH_STORE_QUEUES... it built but I'm not finding an "sq" entry under /proc. (Or anything with "mapping" in it...)Oh well, probably right? Didn't break anything for me:
Tested-by Rob Landley <[email protected]>
Thanks! Seems to pass 0-day testing as well :)
Should I take this in my tree?
greg k-h
Quoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Rob Landley
Quoted 6 lines · Greg Kroah-Hartman
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through thedefault_attrsfield, and thedefault_groupsfield. Move the sh sq sysfs code to usedefault_groupsfield which has been the preferred way sinceaa30f47cf666("kobject: Add support for default attribute groups tokobj_type") so that we can soon get rid of the obsoletedefault_attrsfield.Let's see, sh4-specific, depends on
CONFIG_SH_STORE_QUEUES... it built but I'm not finding an "sq" entry under /proc. (Or anything with "mapping" in it...)
Quoted 7 lines
Quoted 3 lines
Oh well, probably right? Didn't break anything for me:
Tested-by Rob Landley <[email protected]>Thanks! Seems to pass 0-day testing as well :)
Should I take this in my tree?
Yes please.
Rob
Quoted 15 lines · Rob Landley
Quoted 14 lines · Greg Kroah-Hartman
Quoted 13 lines · Rob Landley
Quoted 6 lines · Greg Kroah-Hartman
There are currently 2 ways to create a set of sysfs files for a
kobj_type, through thedefault_attrsfield, and thedefault_groupsfield. Move the sh sq sysfs code to usedefault_groupsfield which has been the preferred way sinceaa30f47cf666("kobject: Add support for default attribute groups tokobj_type") so that we can soon get rid of the obsoletedefault_attrsfield.Let's see, sh4-specific, depends on
CONFIG_SH_STORE_QUEUES... it built but I'm not finding an "sq" entry under /proc. (Or anything with "mapping" in it...)Oh well, probably right? Didn't break anything for me:
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Tested-by Rob Landley <[email protected]>Thanks! Seems to pass 0-day testing as well :)
Should I take this in my tree?
Yes please.
Wonderful, will go do that now.
greg k-h