From: Tom Rix <trix@redhat.com>
To: axboe@kernel.dk, asml.silence@gmail.com, nathan@kernel.org,
ndesaulniers@google.com
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Tom Rix <trix@redhat.com>
Subject: [PATCH] io_uring: initialize count variable to 0
Date: Tue, 24 Jan 2023 04:58:05 -0800 [thread overview]
Message-ID: <20230124125805.630359-1-trix@redhat.com> (raw)
The clang build fails with
io_uring/io_uring.c:1240:3: error: variable 'count' is uninitialized
when used here [-Werror,-Wuninitialized]
count += handle_tw_list(node, &ctx, &uring_locked, &fake);
^~~~~
The commit listed in the fixes: removed the initialization of count.
Fixes: b5b57128d0cd ("io_uring: refactor tctx_task_work")
Signed-off-by: Tom Rix <trix@redhat.com>
---
io_uring/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 734d074cdd94..4cb409ae9840 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1227,7 +1227,7 @@ void tctx_task_work(struct callback_head *cb)
struct llist_node fake = {};
struct llist_node *node;
unsigned int loops = 0;
- unsigned int count;
+ unsigned int count = 0;
if (unlikely(current->flags & PF_EXITING)) {
io_fallback_tw(tctx);
--
2.26.3
next reply other threads:[~2023-01-24 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 12:58 Tom Rix [this message]
2023-01-24 14:01 ` [PATCH] io_uring: initialize count variable to 0 Pavel Begunkov
2023-01-24 14:11 ` Jens Axboe
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=20230124125805.630359-1-trix@redhat.com \
--to=trix@redhat.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/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