public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH v2 3/4] blk-integrity: register sysfs attributes on struct device
Date: Wed, 15 Mar 2023 08:06:51 -0700	[thread overview]
Message-ID: <ZBHfCwnqUtBpqdTW@infradead.org> (raw)
In-Reply-To: <20230309-kobj_release-gendisk_integrity-v2-3-761a50d71900@weissschuh.net>

> +static const struct attribute_group integrity_group  = {

Double whitespace before the =

> +	.name = "integrity", .attrs = integrity_attrs,
>  };

We generally put each field member on separate lines for readability.

>  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?


  reply	other threads:[~2023-03-15 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 22:40 [PATCH v2 0/4] blk-integrity: drop integrity_kobj from gendisk Thomas Weißschuh
2023-03-10 22:40 ` [PATCH v2 1/4] blk-integrity: use sysfs_emit Thomas Weißschuh
2023-03-15 15:00   ` Christoph Hellwig
2023-03-10 22:40 ` [PATCH v2 2/4] blk-integrity: convert to struct device_attribute Thomas Weißschuh
2023-03-15 15:03   ` Christoph Hellwig
2023-03-18 16:54     ` Thomas Weißschuh
2023-03-10 22:40 ` [PATCH v2 3/4] blk-integrity: register sysfs attributes on struct device Thomas Weißschuh
2023-03-15 15:06   ` Christoph Hellwig [this message]
2023-03-18 16:56     ` Thomas Weißschuh
2023-03-10 22:40 ` [PATCH v2 4/4] blk-integrity: drop integrity_kobj from gendisk Thomas Weißschuh
2023-03-15 15:07   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZBHfCwnqUtBpqdTW@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox