[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0e7d7df8-f14e-4925-9c11-d08cb52dd4e6@t-8ch.de>
Date: Sat, 18 Mar 2023 16:56:02 +0000
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jens Axboe <axboe@...nel.dk>, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v2 3/4] blk-integrity: register sysfs attributes on
struct device
On Wed, Mar 15, 2023 at 08:06:51AM -0700, Christoph Hellwig wrote:
> > +static const struct attribute_group integrity_group = {
>
> Double whitespace before the =
Ack.
> > + .name = "integrity", .attrs = integrity_attrs,
> > };
>
> We generally put each field member on separate lines for readability.
Ack.
> > int blk_integrity_add(struct gendisk *disk)
> > {
> > + return device_add_groups(disk_to_dev(disk), integrity_groups);
> > }
> >
> > void blk_integrity_del(struct gendisk *disk)
> > {
> > + device_remove_groups(disk_to_dev(disk), integrity_groups);
>
> Can't we just add integrity_group to disk_attr_groups and remove these
> calls entirely?
Thanks for the pointer. This works and is indeed nicer.
Powered by blists - more mailing lists