[PATCH 4/4] nvme: always initialize known command effects

Christoph Hellwig hch at lst.de
Sun Jan 8 10:21:00 PST 2023


> +static int nvme_init_effects(struct nvme_ctrl *ctrl, bool read_log)

.. this read_log argument really confused me ...

> +	ret = nvme_init_effects(ctrl, id->lpa & NVME_CTRL_LPA_CMD_EFFECTS_LOG);

.. until I saw this.

Any reason to not pass the nvme_id_ctrl to nvme_init_effects and
check the actual flag there?  That avoids losing the context through
that bool parameter.

The rest of this looks good to me.



More information about the Linux-nvme mailing list