From nobody Sun Feb 8 17:24:49 2026 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBE9A1DB122 for ; Wed, 15 Jan 2025 07:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736925580; cv=none; b=u3LaJsPVzMbRzCPLgqRFxWKI59efQVwcj/J8Uv/yIcUy99CmIyqY8XAYb47Wu0QPq2ThJQqPQDrig3LxoxWM2gOt8rHyFrMkggwMLXUoJUyBqTRX5ZLr6R5A0uHQGCZlWgTcu5nPP/0AQUSha0piAnz5xf2Jbx7VN9TyoZWd5JM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736925580; c=relaxed/simple; bh=LTcjzZtHhsK0miT3s180+NkuAFz+KU3ypZAc85z73QQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uaGK2CpElkmWsVRsFEXMsI7JzZp9fqYOA9YlsFXLp/zQSGJmPPVJaLTnLvKroqEb4N8rnLhIg/7MS5HlXNPgcXOkw/1u/XfY4OLVD9/5etrYH+53UATcwEwGpnAUozP6zMfLI+p/Nohz1fB7RuVpjIb7W4Q5U1WmlYMorDqL0o0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Yw6lPsPA; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Yw6lPsPA" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-21669fd5c7cso116331465ad.3 for ; Tue, 14 Jan 2025 23:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736925578; x=1737530378; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1a05J3HKM2oaOOfOGzFEsA4jf+GVrYQB7FJ4mz2osTg=; b=Yw6lPsPA0NJ04NsZ4t05q+wyATZa/cCWId/aUx5RohRP42ypg+LsgC/knN1mfyFyH6 IH5IFqDQKNZGm1FovGkSuUlxSXoaDf+AEaQ27R7LiG6bhgyaFC2DVnHqkNg4DqS0LkDb M3iBWtqUXS6yi5plPf287EOjTg0GNpBjW5f7Uz+rRQsJtPu5YJ4Ys6LEceZEhrcZU4UG 0TU58Yq0ILHSmx5BJsAS1XKy4jfDN/FFvd355j5/566/DMZB71++NA/46+hHvswzX05x dABNMGN8Z1OWE6c/IwyBJZAURFq0YJsVPkcRbydMbRRaRtJLPmGOBL7E13ylOsTW54Bh O0YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736925578; x=1737530378; 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=1a05J3HKM2oaOOfOGzFEsA4jf+GVrYQB7FJ4mz2osTg=; b=NyIYNU+fmvswojGN/bV9GOYOtIzo9m98ig2h4aYMGORAaldaskgOui97NsquKbU+Da BcpJOpYo9a/JQ3VAPOdLjutAqL8UBO7zkeGD+i92kj5cwEVaNDvCz9Vc70EePUOU5cmT n3pgcL8j4r+jli7WVC+zxJQMG1ChsS+zf0Br2FsspmRbFQYFptGG4zCK93hxSip6aQ7H E4TRFEKtyMAM3gOgtKLp4YTJkup20w9IZS9fFZGY/9FXdJJfO4pyxBX0AGTj0Tx0Zv8k 8/2O03cfVPrE3xmFY2bfBPJlR/XzDbLg79vB5odT/BGrJzYbA9bHIL0M4eIb37jnkHhB B1Sg== X-Forwarded-Encrypted: i=1; AJvYcCUya08qPpAq+vA6TIgcxh7x2DI/rMCB/0pBXBqNpcPN1k98d9q31CFN6SyqOkGho0Xk5ZfrHllIN+MevKw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz4nGkMJpDRUvbPevONAMPXhxthXT7ReFNZuD2yDu14LkXUsX4E DMbNgqaMvBbdt2ISJQTbnlx9sXKk3djkSVAx3Nt3rM4+lNd2Egbt X-Gm-Gg: ASbGncufstqrZDekT5LzbJldsqMLaxY43E7eOUr59ZrNSh6CnTGyW1AiYoUEp/M+W7f VUfNUSSBtP+2+tTGLTzGQIrfBeAIl7xfqpKKqsUY+D8nplbc41Kz+KVp52XV0c8tMx65CiWDrnh NdS/RWzq8veWcBVk7622Ehai4MyftIAF521+H0GfWRMnIoAy4rZByVowpHnGsMQLhtKidXbobfr lrAGuRlsZP67+eVt/wbLjtk/jryMbsRIa4+HV3NoTBu0xFO1WilHHs4KIxo7LHzufW1RNOWIBrW X-Google-Smtp-Source: AGHT+IFoZIOo3hccXkzlHgj7NhbazUxfojj2e4KNOFB3Ezi2WKt7ioIJxM8QFTlm3PK3T18wpCul0A== X-Received: by 2002:a05:6a00:4518:b0:726:41e:b314 with SMTP id d2e1a72fcca58-72d21fd881emr42908741b3a.19.1736925577707; Tue, 14 Jan 2025 23:19:37 -0800 (PST) Received: from vaxr-BM6660-BM6360.. ([2001:288:7001:2703:28fd:3600:7f32:c355]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72d406817absm8838984b3a.147.2025.01.14.23.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 23:19:37 -0800 (PST) From: I Hsin Cheng To: yury.norov@gmail.com Cc: linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org, jserv@ccns.ncku.edu.tw, visitorckw@gmail.com, I Hsin Cheng Subject: [PATCH] cpumask: Rephrase comments for cpu_any*() APIs Date: Wed, 15 Jan 2025 15:19:32 +0800 Message-ID: <20250115071932.43607-1-richard120310@gmail.com> X-Mailer: git-send-email 2.43.0 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" The cpu_any*() APIs comment states that it returns a "random" cpu within the given cpumask. Hoever it's not actually random as random itself stands a meaning for uniform distribution. cpu_any*() APIs are a naming convention for the caller to states that it doesn't care which CPU it gets, so change "random" to "arbitrary" would be more appropriate. Signed-off-by: I Hsin Cheng Reviewed-by: Kuan-Wei Chiu --- include/linux/cpumask.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 9278a50d5..2769419a0 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -391,7 +391,7 @@ unsigned int __pure cpumask_next_wrap(int n, const stru= ct cpumask *mask, int sta for_each_set_bit_from(cpu, cpumask_bits(mask), small_cpumask_bits) =20 /** - * cpumask_any_but - return a "random" in a cpumask, but not this one. + * cpumask_any_but - return an "arbitrary" cpu in a cpumask, but not this = one. * @mask: the cpumask to search * @cpu: the cpu to ignore. * @@ -411,7 +411,7 @@ unsigned int cpumask_any_but(const struct cpumask *mask= , unsigned int cpu) } =20 /** - * cpumask_any_and_but - pick a "random" cpu from *mask1 & *mask2, but not= this one. + * cpumask_any_and_but - pick an "arbitrary" cpu from *mask1 & *mask2, but= not this one. * @mask1: the first input cpumask * @mask2: the second input cpumask * @cpu: the cpu to ignore @@ -840,7 +840,7 @@ void cpumask_copy(struct cpumask *dstp, const struct cp= umask *srcp) } =20 /** - * cpumask_any - pick a "random" cpu from *srcp + * cpumask_any - pick an "arbitrary" cpu from *srcp * @srcp: the input cpumask * * Return: >=3D nr_cpu_ids if no cpus set. @@ -848,7 +848,7 @@ void cpumask_copy(struct cpumask *dstp, const struct cp= umask *srcp) #define cpumask_any(srcp) cpumask_first(srcp) =20 /** - * cpumask_any_and - pick a "random" cpu from *mask1 & *mask2 + * cpumask_any_and - pick an "arbitrary" cpu from *mask1 & *mask2 * @mask1: the first input cpumask * @mask2: the second input cpumask * --=20 2.43.0