[PATCH 3/6] nvmet: set 'CNTRLTYPE' in the identify controller data

Christoph Hellwig hch at lst.de
Tue Sep 21 22:00:28 PDT 2021


On Wed, Sep 22, 2021 at 01:23:03AM +0000, Chaitanya Kulkarni wrote:
> since this check is used on more than one place in this patch,
> why not have a helper instead of opencoding that makes code easy so
> search e.g.
> 
> bool nvmet_is_subsys_disc(struct nvmet_subsys *s)
> {
> 	return subsys->type == NVME_NQN_DISC ? true : false;

That can be just:

	return subsys->type == NVME_NQN_DISC;



More information about the Linux-nvme mailing list