linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Len Baker <len.baker@gmx.com>, Keith Busch <kbusch@kernel.org>,
	Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
	Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: Kees Cook <keescook@chromium.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"linux-hardening@vger.kernel.org"
	<linux-hardening@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nvmet: prefer flex_array_size and struct_size over open coded arithmetic
Date: Wed, 27 Oct 2021 00:13:42 +0000	[thread overview]
Message-ID: <b4c1c399-2332-e594-15e0-bd4883818c58@nvidia.com> (raw)
In-Reply-To: <20211024172921.4110-1-len.baker@gmx.com>

On 10/24/21 10:29 AM, Len Baker wrote:
> External email: Use caution opening links or attachments
> 
> 
> In an effort to avoid open-coded arithmetic in the kernel [1], use the
> flex_array_size() and struct_size() helpers instead of an open-coded
> calculation.
> 
> [1] https://github.com/KSPP/linux/issues/160
> 
> Signed-off-by: Len Baker <len.baker@gmx.com>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>



  parent reply	other threads:[~2021-10-27  0:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-24 17:29 [PATCH] nvmet: prefer flex_array_size and struct_size over open coded arithmetic Len Baker
2021-10-25  7:18 ` Sagi Grimberg
2021-10-25 21:05 ` Gustavo A. R. Silva
2021-10-27  0:13 ` Chaitanya Kulkarni [this message]
2021-10-27  6:07 ` Christoph Hellwig
2021-10-29 17:04   ` Len Baker

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=b4c1c399-2332-e594-15e0-bd4883818c58@nvidia.com \
    --to=chaitanyak@nvidia.com \
    --cc=axboe@fb.com \
    --cc=gustavoars@kernel.org \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=keescook@chromium.org \
    --cc=len.baker@gmx.com \
    --cc=linux-hardening@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).