Skip to content

Commit 3b2f70e

Browse files
masalkhihailan94
authored andcommitted
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>
1 parent 408434a commit 3b2f70e

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

drivers/md/md.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6055,10 +6055,7 @@ static struct attribute *md_default_attrs[] = {
60556055
&md_logical_block_size.attr,
60566056
NULL,
60576057
};
6058-
6059-
static const struct attribute_group md_default_group = {
6060-
.attrs = md_default_attrs,
6061-
};
6058+
ATTRIBUTE_GROUPS(md_default);
60626059

60636060
static struct attribute *md_redundancy_attrs[] = {
60646061
&md_scan_mode.attr,
@@ -6083,11 +6080,6 @@ static const struct attribute_group md_redundancy_group = {
60836080
.attrs = md_redundancy_attrs,
60846081
};
60856082

6086-
static const struct attribute_group *md_attr_groups[] = {
6087-
&md_default_group,
6088-
NULL,
6089-
};
6090-
60916083
static ssize_t
60926084
md_attr_show(struct kobject *kobj, struct attribute *attr, char *page)
60936085
{
@@ -6170,7 +6162,7 @@ static const struct sysfs_ops md_sysfs_ops = {
61706162
static const struct kobj_type md_ktype = {
61716163
.release = md_kobj_release,
61726164
.sysfs_ops = &md_sysfs_ops,
6173-
.default_groups = md_attr_groups,
6165+
.default_groups = md_default_groups,
61746166
};
61756167

61766168
int mdp_major = 0;

0 commit comments

Comments
 (0)