public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Guixin Liu <kanie@linux.alibaba.com>
Cc: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH V2] nvme: introduce nvme_disk_is_ns_head helper
Date: Wed, 27 Dec 2023 10:20:31 +0100	[thread overview]
Message-ID: <20231227092031.GA23040@lst.de> (raw)
In-Reply-To: <20231227090525.26662-1-kanie@linux.alibaba.com>

On Wed, Dec 27, 2023 at 05:05:25PM +0800, Guixin Liu wrote:
>  
> +static inline bool nvme_disk_is_ns_head(struct gendisk *disk)
> +{
> +	if (disk->fops == &nvme_ns_head_ops)
> +		return true;
> +	return false;

I would still keep it simple here:

	return disk->fops == &nvme_ns_head_ops;

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


  reply	other threads:[~2023-12-27  9:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  9:05 [PATCH V2] nvme: introduce nvme_disk_is_ns_head helper Guixin Liu
2023-12-27  9:20 ` Christoph Hellwig [this message]
2024-01-01  9:50 ` Sagi Grimberg

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=20231227092031.GA23040@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kanie@linux.alibaba.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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