From nobody Mon Dec 15 21:43:06 2025 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 A8FA420B20 for ; Fri, 17 Jan 2025 14:27:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737124059; cv=none; b=VMrVEumufw9G/wHTveILYbV5qdGTGOz4QKv47svpSSXu8LKlZCCdOuIqe6W9eJ2ROX70oVyZDxt2zHJ1oPs847rvPp67oM0G74JxZ0n3My8/ruU9kzq+ViP86H9HfYWy/cios0Uc7MkZCZW6HF/WcpFOEaQwT6mJLMxUFPry2Xc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737124059; c=relaxed/simple; bh=UQ/oEaYrdi/JSiSxQXLIcuhr32BVK2Vyfsp9x2kbiU0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=m9joY6CImYFqntR/szYb68Slp+lcm6s6jx8ahlLe5Txk/MSHO1a81SX7EwcmzDWueOAPwSOxGI30qJZtJVwzNQj5g5o8DsgUPO0lVa1sU3D+OrFEKok1Zyk7VdL3BHNBLYOb5sqInDSKzCtRhHeROctD4gTkWNFwCSfHrQHIYNk= 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=SOxQEtMn; arc=none smtp.client-ip=209.85.214.181 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="SOxQEtMn" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-21644aca3a0so52035225ad.3 for ; Fri, 17 Jan 2025 06:27:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737124057; x=1737728857; 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=mC8LhBSDhIQWurucPsfRIAzpanO2DtiY2XNBhvMO4WQ=; b=SOxQEtMn38hmXFCWEDEnqwWmK0p56Gq/Tbo09h3sXe47h32559Wyma56n1+y60LfUr ut3glxaMqShHsMSisMJFpb5Jlq49PW3Ji8VGMtsIzHemf8rOv7sUrAhww4AErX4LROXa h45MWL2KMlgEyMMcM1/VRG2XWFj2Iz+EebFuGfNXv9wNuU2yOwzfSkflYJB+D7kDxK8L 0hl9TIzyotvTGRNbelvNO3JeYKaqCvATYZsvrLuWfKIu2BxJf/eMVYxrUw0Siu74gyfi rGfjttQtQzK7Ueoq22jkNf0cZQvLx2nn6RCSYHZZ7YsG/NlEi7AE3hVgzYA1G/k5zywK PhBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737124057; x=1737728857; 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=mC8LhBSDhIQWurucPsfRIAzpanO2DtiY2XNBhvMO4WQ=; b=gbEyCgKfyaY2fAInzyBkmt8Eno1rfHO/GKWhWXDM45ZMRDcASFgpefasLs41iuGjky 2gwurMSQf4LHrPs3iCd+ah5LDqLLstiM99bnrP5rdKtF5EFtnEuF9QaxwDK94p5FroYX zYch8LW13jBrA8RcLGaMFAlJNY1cQ5+SVloyhhi++u5HhB8uYdKUn+IguaijCP6nD9AK 9hp6sjJbsFzwFdcxJupqWxST2jFdMra6xvtFQqrQ87dBDK95PcPWduheVm+4fUWCzp/9 8mbjC7/FufVScJv+9o+z3bLJNw+xIjxCaXD+aW+fCKck3kUDi0+02k/3ZZfAX4LjVMl0 pYjQ== X-Forwarded-Encrypted: i=1; AJvYcCW9typk2RylxxFrSpNDcMNXomiwA0yR/giOKTJCsz1zerxEcS3Jc0966BE6sBHdfMuHN0rLV7K7YOE9618=@vger.kernel.org X-Gm-Message-State: AOJu0YyH+7gxaJ5v0jd04r/ROOT0V/wV9RRabytrH5Jf3tV0u9QkBYk/ 57wyBQh+A1C5P6VA1LtQLfr++/JcHsTzF8c5jB/9AEbsM3QjU7Im X-Gm-Gg: ASbGncs1mdjUerSswF0hBIn/SjBOvl0iDQM3hj/9Pb/+vRidQB86QOatsADjW1hoWTJ /3XsEQV4IKI4z7g9N/z08IVZycD1HO0VoQnLCeUDwYHM/VSGtB8JEyaJuVwZwHXJJYZgpmi0ojK JGTQWty/2YM6OOfEJBZx63Smqffa5BoxEFEUhOHQr9iQlYf3/9+/WzDWpUaTR9yxyDRXprIVUwA 2vctHvKfgd7kXNMVnFg4GZsdD8wEz1ckd7NlF6b2SG3MmMYAVJaeE074ACR0gB0AigA2UU3w8pb X-Google-Smtp-Source: AGHT+IEcQQRjY3PV8vAjgvG0rEh3CaAWxMKJHTusq2rnNsJNwQyYzEmvlYlG3/1fTdkCpshTzGIIXw== X-Received: by 2002:a17:902:e54d:b0:215:a3fd:61f5 with SMTP id d9443c01a7336-21c352de0femr42297625ad.5.1737124056863; Fri, 17 Jan 2025 06:27:36 -0800 (PST) Received: from vaxr-BM6660-BM6360.. ([2001:288:7001:2703:5341:ba8d:225b:c32b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2d3a8a2bsm16637425ad.142.2025.01.17.06.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 06:27:36 -0800 (PST) From: I Hsin Cheng To: yury.norov@gmail.com Cc: mark.rutland@arm.com, visitorckw@gmail.com, linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org, jserv@ccns.ncku.edu.tw, I Hsin Cheng Subject: [PATCH v3] cpumask: Rephrase comments for cpu_any*() APIs Date: Fri, 17 Jan 2025 22:27:24 +0800 Message-ID: <20250117142724.17657-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. However 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 --- v1 -> v2: - Fix typo for Hoever/However - Drop quotes around 'arbitrary' word v2 -> v3: - Place changelogs in the correct position 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..93be218fc 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 on= e. * @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 n= ot 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