[PATCH 1/2] nvmet: return Invalid Field for invalid NSIDs in Set Features 82h
Christoph Hellwig
hch at lst.de
Fri Sep 18 05:05:11 PDT 2026
On Fri, Sep 18, 2026 at 11:39:31AM +0800, Guixin Liu wrote:
> - if (status)
> + if (status) {
> + /* 82h is Invalid Field for invalid NSIDs, not Invalid NS */
Overly long line, but I don't this comment is very helpful as-is anyway.
For one mentioning the value while the code uses symbolic names is
confusing, but otherwise it also doesn't really say why we care.
IMHO we can just drop it?
> + if (status == (NVME_SC_INVALID_NS | NVME_STATUS_DNR))
no need for the braces.
> + status = NVME_SC_INVALID_FIELD | NVME_STATUS_DNR;
Another overly long line. Easily fixed by just directly returning:
return NVME_SC_INVALID_FIELD | NVME_STATUS_DNR;
More information about the Linux-nvme
mailing list