All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Eugene Korenevsky <ekorenevsky@aliyun.com>,
	Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] nvme: nvme_identify_ns_descs: prevent oob
Date: Tue, 2 Dec 2025 06:57:13 +0100	[thread overview]
Message-ID: <20251202055713.GB15852@lst.de> (raw)
In-Reply-To: <aS4yhAhZYjvHOqtD@kbusch-mbp>

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.


  reply	other threads:[~2025-12-02  5:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01 19:43 [PATCH v3] nvme: nvme_identify_ns_descs: prevent oob Eugene Korenevsky
2025-12-02  0:27 ` Keith Busch
2025-12-02  5:57   ` Christoph Hellwig [this message]
2025-12-02 20:30   ` Eugene Korenevsky
2025-12-02 20:34     ` Keith Busch

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=20251202055713.GB15852@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=ekorenevsky@aliyun.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.