mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Breno Leitao <leitao@debian.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	io-uring@vger.kernel.org
Cc: leit@meta.com, linux-kernel@vger.kernel.org, gustavold@meta.com
Subject: Re: [PATCH 1/2] io_uring: Move from hlist to io_wq_work_node
Date: Tue, 21 Feb 2023 16:53:27 -0700	[thread overview]
Message-ID: <15f4a519-cc2b-1cad-571a-a36e67d6101f@kernel.dk> (raw)
In-Reply-To: <b04b7d5d-582f-1b45-efa3-6e951dfc3cbf@debian.org>

On 2/21/23 11:38?AM, Breno Leitao wrote:
> Sure. I will remove the assignents in "if" part and maybe replicate what
> we have
> in io_alloc_cache_get(). Something as:
>        if (cache->list.next) {
>                node = cache->list.next;
> 
> Thanks for the review!

Pavel is right in that we generally discourage assignments in if
statements etc. For the above, the usual approach would be:

node = cache->list.next;
if (node) {
	...
}

-- 
Jens Axboe


      parent reply	other threads:[~2023-02-21 23:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21 13:57 Breno Leitao
2023-02-21 13:57 ` [PATCH 2/2] io_uring: Add KASAN support for alloc_caches Breno Leitao
2023-02-21 16:39   ` kernel test robot
2023-02-21 17:45 ` [PATCH 1/2] io_uring: Move from hlist to io_wq_work_node Pavel Begunkov
2023-02-21 18:38   ` Breno Leitao
2023-02-21 18:43     ` Pavel Begunkov
2023-02-21 23:53     ` Jens Axboe [this message]

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=15f4a519-cc2b-1cad-571a-a36e67d6101f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asml.silence@gmail.com \
    --cc=gustavold@meta.com \
    --cc=io-uring@vger.kernel.org \
    --cc=leit@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®