From nobody Wed Dec 17 00:16:33 2025 Received: from out162-62-57-210.mail.qq.com (out162-62-57-210.mail.qq.com [162.62.57.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 034012DF153 for ; Thu, 11 Dec 2025 08:42:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.62.57.210 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765442527; cv=none; b=b66dwk0d4ykOTFMOCLGovXqvR+TbHdEi2IjMyphm3k02K3jJsnqPihZpQtHJgZUIJHJmwm8N/M582FMfDGs5k1LvwQxsnUx6virN7v/30dK9agY383EpjzgKwG78MEG50pedXE5Dm0/JBVL5pPMSmohHFcS8gA3wfIUtIRnwSDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765442527; c=relaxed/simple; bh=86jM6/8ayfHPNKCYQQ/v+Gxswje4pbMb7uGQHheHd4c=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=TSyVlfOVZqzxjFDBWho1/YeYRneJT00kYA3gova/n8gL2NC4OYvHpGunFWdJs3bx35WNfhP0ORAFdG7kD2dt1tAaLETXjtXswk7y3gbiJd/rnV1qtzMzi7jAgq7jOshCoR7ByHqNTx4gloGF8b09EBa9TO9QYy/neHwjlV4r6yU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foxmail.com; spf=pass smtp.mailfrom=foxmail.com; dkim=pass (1024-bit key) header.d=foxmail.com header.i=@foxmail.com header.b=dDa7zysS; arc=none smtp.client-ip=162.62.57.210 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foxmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foxmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=foxmail.com header.i=@foxmail.com header.b="dDa7zysS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1765442519; bh=zDJ4Agqgm0IgPliNwt9ogn6DK+Rs7gCySxS9/AzULK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dDa7zysScahAeibU60mRICgjxH1Oye3XmyYw2ACSNTBjoGDSVhWXoqu8FZUMCf/BK 5LlFY4QlZmdvPeqRh4nzA+6geWiKE6vO9UEQnrCwX1XKUqRpSCuCk9ptCiE5X3oLY1 WB6gO8VkQx3A2kKpQmKTL6iZokZDxZHMqNbROaww= Received: from meizu-Precision-3660.meizu.com ([112.91.84.72]) by newxmesmtplogicsvrszc43-0.qq.com (NewEsmtp) with SMTP id 98F2F61A; Thu, 11 Dec 2025 16:38:15 +0800 X-QQ-mid: xmsmtpt1765442295tlnjc9yz3 Message-ID: X-QQ-XMAILINFO: NZSml8PQdeKA9C/wv1ou5+KuyIg96s2waQuBjc517SWlxQfXhoeAAavj3syLmY /ZctY03wPWwjT9KZMJPLllDLSTWsnAZGHFX/E4M6DkwFFoqix2PFxVoroqBwtkVBnSi3swY5P5Z8 cFfBuAfLwpewDAtrN/7BlCxDGqNTJhu12ORSh859+6ubM6c05Xpo4hk5WoynNtx6HtYwE8WL81OZ Enb7xemSJhwUR5GKmNVXF00H7N49hTc4EZmqUYPk+UY/nPIrs14c7/RzjoT3yHMQPhNiSW0FKDjA tAycSpW7636IfQzOmglfdN1m3ad9UPg4kTDPZgoW9QqpcXUiJzwYm9I8YbKOpdoG+BCVlfCxY2V5 ENimuGZM5M289X7NgyyI4UgxnMiBJmlk1BXhsLt8G2gHjfa/WnULBPQVFPirajz3Taiz/longMUx dwO9f8pQs51BNyiCaltv0dJTha0JDc7TvUsGpfCpQIHGDDW871hYh3ELshi1cCrMj5/28njkUftR 7nKHlTb3zhdNqA25FOE2CbzhuhcMOljTkg3jzNP9CYBGwUtjJt+J9W+/ARxaBxlWtYc3mG0Jjb6G tUeoyAuqFXQn22aIH8OIfF3MehdXVXaVoSAgSjQEYXKKg0IWSZzsMlME3ghmJoGHXMGMv60NL52J n4mz/s/x3TUwWcz9hzPPCUG9Yqp4yGMLxGKgmcmwkECSkTCIDhVVae5BE2+32jtiJQ/yWQCIqvDp 9/eGjEYHEu24kZAWxGy+xJHkr+YsNi/vMjjOXGPoQ8l9W8eO2qGDUvt4r9BcrS6k3EIU62SUf0Y9 p1gUYGBDdeKLDwKvV0ep6du+Fm9XlvZIAvy3RH+uSOC2A9WsFUVNiUhRUOy7jXQ3wPmTAap6OxHW btTRhpUe4q+GCihdvjaexrN7jxbqBgxjuTgQxraqn4mJE7c8c+eJEq67EnYaOSE4qTo50u7/OEca 1CfZGySC23W6fEK/nosJRegmFHYba6tnY+fHXcEBuDx4thOIw5aIsfAkbXICKaggGeZrwou1Sm4o hmNfXjwdOmVRF2Koje4/pYBnXDnp5vX+QmsJ5MpJ3dU7wlTvRXMdTEbbb3x/t7eCadqLUaY+8A1K EQGjHJW0ms2rKLfZF9W1Bl79J7TLNmPtN3yWu6 X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yuwen Chen To: ywen.chen@foxmail.com Cc: akpm@linux-foundation.org, andrealmeid@igalia.com, dave@stgolabs.net, dbueso@suse.de, dvhart@infradead.org, edliaw@google.com, hpa@linux.intel.com, justinstitt@google.com, kernel-team@android.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, llvm@lists.linux.dev, luto@mit.edu, mingo@redhat.com, morbo@google.com, nathan@kernel.org, ndesaulniers@google.com, peterz@infradead.org, shuah@kernel.org, tglx@linutronix.de, usama.anjum@collabora.com Subject: [PATCH 1/3] selftests/futex: reduce array declarations in the requeue_single Date: Thu, 11 Dec 2025 16:38:13 +0800 X-OQ-MSGID: <20251211083813.1795854-1-ywen.chen@foxmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In the requeue_single function, the variable "waits" only uses one element. There is no need to use an array. Signed-off-by: Yuwen Chen --- tools/testing/selftests/futex/functional/futex_requeue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/futex/functional/futex_requeue.c b/too= ls/testing/selftests/futex/functional/futex_requeue.c index 69e2555b60399..1807465de2144 100644 --- a/tools/testing/selftests/futex/functional/futex_requeue.c +++ b/tools/testing/selftests/futex/functional/futex_requeue.c @@ -33,7 +33,7 @@ TEST(requeue_single) { volatile futex_t _f1 =3D 0; volatile futex_t f2 =3D 0; - pthread_t waiter[10]; + pthread_t waiter; int res; =20 f1 =3D &_f1; @@ -41,7 +41,7 @@ TEST(requeue_single) /* * Requeue a waiter from f1 to f2, and wake f2. */ - if (pthread_create(&waiter[0], NULL, waiterfn, NULL)) + if (pthread_create(&waiter, NULL, waiterfn, NULL)) ksft_exit_fail_msg("pthread_create failed\n"); =20 usleep(WAKE_WAIT_US); --=20 2.34.1