[PATCH v3] nvme: nvme_identify_ns_descs: prevent oob
Christoph Hellwig
hch at lst.de
Mon Dec 1 21:57:13 PST 2025
On Mon, Dec 01, 2025 at 05:27:48PM -0700, Keith Busch wrote:
> I don't want bikeshed this, but I thought this looked better as a
> for-loop. You can just modify the continuing condition instead of
> changing the loop type to do-while.
The reason I went for the while in my whiteboard coding is that it
would allow for keeping len local inside the loop, which I like
in general. The actual patch doesn't do this anyway, and I don't
care too strongly, so I'm fine with the somewhat more natural for
loop as well.
More information about the Linux-nvme
mailing list