Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9FC1FC25B4E for ; Tue, 24 Jan 2023 12:59:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233417AbjAXM7g (ORCPT ); Tue, 24 Jan 2023 07:59:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233119AbjAXM7d (ORCPT ); Tue, 24 Jan 2023 07:59:33 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 300DC42BD2 for ; Tue, 24 Jan 2023 04:58:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674565098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ZSi6S+muZGTgBwtIdsJ5fCvNBIzBTV5J3NQ7wnrMIF8=; b=TFmHdcpenNEKi4Fl/mEdv4jzvXsPXciXZ/565PdS4yzowAhlcfKRQgeM/PLgZlXtDpGq0l NUyjw3mXTqKoGBVNqUWtxrkpOC4ZWAzY8RR/kAuJi4czk/O3US4DwoI78w/nHD1FOqXHqv a8m/vbv5FqDnP/C7aGkxzkSmTE+2RQY= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-153-weAzCEXCOHmG9XVJtf0iMw-1; Tue, 24 Jan 2023 07:58:17 -0500 X-MC-Unique: weAzCEXCOHmG9XVJtf0iMw-1 Received: by mail-qv1-f71.google.com with SMTP id r10-20020ad4522a000000b004d28fcbfe17so7501409qvq.4 for ; Tue, 24 Jan 2023 04:58:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZSi6S+muZGTgBwtIdsJ5fCvNBIzBTV5J3NQ7wnrMIF8=; b=Pl9SoFhX7b7An5/92LMVCURjthEp5PfDhl01rv+s3PysC9sL2ANPxCeCkUrDNbeQIA Rfri7qKLznsK1kFv6NznUS0QVBqAZDWSWwYkJdbYCHe0oY6bwRspAQLC4okZ+o5gch6s 4mdBquSSWZTWyf3kGNJSThIyaRQlwp0dUW+O4YNdCWoX7WpGN519OIVLZqZ0tqwjqMx2 9vaxDMggd8xqRwseUjqTiA9ofoToLa+JZ35UIW4vOe0uzr0yeuF6hQ1bFcO/dWrZJFH4 oMTqKJODoyLP+O1mIRWg/rx6W7/2KoZzdEy1RWSoGLCBKg1sXVn+ZyJ1J9BVFRcVoqde 4k3A== X-Gm-Message-State: AFqh2ko2NmN6IJl6gCdiw3ZRLAYt7xpUhg92CkpIlXzdQt6pLVUFGrDj gn4Gxusd4c+Zny8nX61byzvUwcsq/wd5mayRMQxCJ7pYvX2D4zNKhvd3+dbT/38Ip0qYlJ3UEsj GAUqY3gdFaRlq6VhXmE0TX/ES X-Received: by 2002:ac8:7350:0:b0:3b6:90c4:b13a with SMTP id q16-20020ac87350000000b003b690c4b13amr27608078qtp.58.1674565096640; Tue, 24 Jan 2023 04:58:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXtLt3U69T2XRyfXT9r14cbZA03RVHPgFC5vWRm+j1Qb42uI3X9erIeuPmuCPjOI5VnlnIACFQ== X-Received: by 2002:ac8:7350:0:b0:3b6:90c4:b13a with SMTP id q16-20020ac87350000000b003b690c4b13amr27608059qtp.58.1674565096385; Tue, 24 Jan 2023 04:58:16 -0800 (PST) Received: from localhost.localdomain.com (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id r22-20020ac87ef6000000b003ab7aee56a0sm1192570qtc.39.2023.01.24.04.58.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 04:58:16 -0800 (PST) From: Tom Rix 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 Subject: [PATCH] io_uring: initialize count variable to 0 Date: Tue, 24 Jan 2023 04:58:05 -0800 Message-Id: <20230124125805.630359-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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