Message ID | 20220713113125.2232975-4-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/9] md: fix error handling in md_alloc | expand |
On 7/13/22 7:31 PM, Christoph Hellwig wrote: > The md_free name is rather misleading, so pick a better one. > > Signed-off-by: Christoph Hellwig<hch@lst.de> > --- > drivers/md/md.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/md/md.c b/drivers/md/md.c > index 2beaadd202c4e..3127dcb8102ce 100644 > --- a/drivers/md/md.c > +++ b/drivers/md/md.c > @@ -5590,7 +5590,7 @@ md_attr_store(struct kobject *kobj, struct attribute *attr, > return rv; > } > > -static void md_free(struct kobject *ko) > +static void md_kobj_release(struct kobject **ko*) While at it, how about rename it to kobj? > { > struct mddev *mddev = container_of(ko, struct mddev, kobj); > > @@ -5610,7 +5610,7 @@ static const struct sysfs_ops md_sysfs_ops = { > .store = md_attr_store, > }; > static struct kobj_type md_ktype = { > - .release = md_free, > + .release = md_kobj_release, > .sysfs_ops = &md_sysfs_ops, > .default_groups = md_attr_groups, > }; Acked-by: Guoqing Jiang <guoqing.jiang@linux.dev> Thanks, Guoqing
diff --git a/drivers/md/md.c b/drivers/md/md.c index 2beaadd202c4e..3127dcb8102ce 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5590,7 +5590,7 @@ md_attr_store(struct kobject *kobj, struct attribute *attr, return rv; } -static void md_free(struct kobject *ko) +static void md_kobj_release(struct kobject *ko) { struct mddev *mddev = container_of(ko, struct mddev, kobj); @@ -5610,7 +5610,7 @@ static const struct sysfs_ops md_sysfs_ops = { .store = md_attr_store, }; static struct kobj_type md_ktype = { - .release = md_free, + .release = md_kobj_release, .sysfs_ops = &md_sysfs_ops, .default_groups = md_attr_groups, };
The md_free name is rather misleading, so pick a better one. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)