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 1/4] blk-integrity: use sysfs_emit
Date: Wed, 15 Mar 2023 08:00:26 -0700	[thread overview]
Message-ID: <ZBHditvgrS3jKvNr@infradead.org> (raw)
In-Reply-To: <20230309-kobj_release-gendisk_integrity-v2-1-761a50d71900@weissschuh.net>

>  	if (bi->profile && bi->profile->name)
> -		return sprintf(page, "%s\n", bi->profile->name);
> +		return sysfs_emit(page, "%s\n", bi->profile->name);
>  	else

Might be worth to drop the else here if you touch the function.

>
> +	return sysfs_emit(page, "%d\n", (bi->flags & BLK_INTEGRITY_VERIFY) != 0);

Please shorten these != 0 to !! expressions, i.e.

	return sysfs_emit(page, "%d\n", !!(bi->flags & BLK_INTEGRITY_VERIFY));


  reply	other threads:[~2023-03-15 15:01 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 [this message]
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
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=ZBHditvgrS3jKvNr@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