public inbox for [email protected]
 help / color / mirror / Atom feed
From: Qian Cai <[email protected]>
To: Pavel Begunkov <[email protected]>, Jens Axboe <[email protected]>
Cc: <[email protected]>, <[email protected]>
Subject: Re: [PATCH] io_uring: fix a GCC warning in wq_list_for_each()
Date: Wed, 27 Oct 2021 11:11:56 -0400	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>



On 10/27/21 5:56 AM, Pavel Begunkov wrote:
> On 10/25/21 15:59, Qian Cai wrote:
>> fs/io_uring.c: In function '__io_submit_flush_completions':
>> fs/io_uring.c:2367:33: warning: variable 'prev' set but not used
>> [-Wunused-but-set-variable]
>>   2367 |  struct io_wq_work_node *node, *prev;
>>        |                                 ^~~~
>>
>> Fixed it by open-coded the wq_list_for_each() without an unused previous
>> node pointer.
> 
> That's intentional, the var is optimised out and it's better to
> not hand code it (if possible).

Yes, this is pretty minor. Not going to insist if people don't like for
some reasons.

      reply	other threads:[~2021-10-27 15:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 14:59 [PATCH] io_uring: fix a GCC warning in wq_list_for_each() Qian Cai
2021-10-27  9:56 ` Pavel Begunkov
2021-10-27 15:11   ` Qian Cai [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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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