diff options
| author | Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com> | 2026-04-23 13:13:03 +0300 |
|---|---|---|
| committer | Yu Kuai <yukuai@fnnas.com> | 2026-04-28 15:44:38 +0300 |
| commit | 3b2f70eab5a2cd15e27b1447e66e45302b28ff2c (patch) | |
| tree | 00b761d8b4b86bb734e392a4aa310106f437e4ce | |
| parent | 408434a3245cc6ea981df4edd7fbf0be49856727 (diff) | |
| download | linux-3b2f70eab5a2cd15e27b1447e66e45302b28ff2c.tar.xz | |
md: use ATTRIBUTE_GROUPS() for md default sysfs attributes
Replace the md_default_group and md_attr_groups with
ATTRIBUTE_GROUPS().
Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Link: https://lore.kernel.org/linux-raid/20260423101303.48196-4-abd.masalkhi@gmail.com
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
| -rw-r--r-- | drivers/md/md.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index a4b1048adbba..8b568eee8743 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -6055,10 +6055,7 @@ static struct attribute *md_default_attrs[] = { &md_logical_block_size.attr, NULL, }; - -static const struct attribute_group md_default_group = { - .attrs = md_default_attrs, -}; +ATTRIBUTE_GROUPS(md_default); static struct attribute *md_redundancy_attrs[] = { &md_scan_mode.attr, @@ -6083,11 +6080,6 @@ static const struct attribute_group md_redundancy_group = { .attrs = md_redundancy_attrs, }; -static const struct attribute_group *md_attr_groups[] = { - &md_default_group, - NULL, -}; - static ssize_t md_attr_show(struct kobject *kobj, struct attribute *attr, char *page) { @@ -6170,7 +6162,7 @@ static const struct sysfs_ops md_sysfs_ops = { static const struct kobj_type md_ktype = { .release = md_kobj_release, .sysfs_ops = &md_sysfs_ops, - .default_groups = md_attr_groups, + .default_groups = md_default_groups, }; int mdp_major = 0; |
