From nobody Sun Feb 8 13:39:14 2026 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 AA6AA1FF618 for ; Fri, 17 Jan 2025 13:23:21 +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=1737120203; cv=none; b=mE+/Tr5QTc7w+6aZOMNjmzZOzpwgKk4rBUOq57paS1H+Ditp5zaF8Mpkdz9TZAlGYrUBDR6pRQp2EWt9WorXSo6fGoxKH6+KxBGBzJVPP5lRjOE/Xbg8bs9kqYUMMPQd0aBF9IHkQdHRkp1SObluGLJuj046ehEnBBnZ9qCoFgw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737120203; c=relaxed/simple; bh=CYqQg68tXGwX8Yg9KG1l/23B14GowQzm/q3CBKlrXko=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cdZFNK2EwbRJ8lmcHrnPUIUJydpFgdVln7XROigHaVtv7yKh6atdn7BX3zevym3L9HND7Tb6yDsDPdvGMs1WuBJSY2MSurPs9vZODUC9cwxEA656GK8sIS2ojD/M+sYSrnwFerW01XguQVCvd3B7oV/0oeXVxFzjdQyPSUmVf8s= 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=WSuUTX8X; 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="WSuUTX8X" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-21a7ed0155cso32321645ad.3 for ; Fri, 17 Jan 2025 05:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737120201; x=1737725001; 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=iEfVKjlzcTZY90DixA88DlvdIcpuOzXr0Mq5AmA5lYo=; b=WSuUTX8XUx//YpS2Ju/CdaBtubYjuZJgGyaPFk3fsXVU+OrUwe5SVZP6u0DbxZ0NF5 UyHvUNfeEBJ8okl5MsLn8rZU6GRrxjs+itQ0wpVciYGzrqImLp0MIEW4+BfdgiqgC4JZ SiEM6e6p9Wv+4XJQ4tNKKWijmmUk30+noeAxTOzIVIkHor6cSXkZQt+qYp/+psBi9pfu u1QEod3bk7N3iwGOO5DF2KlYAm58mH3UHV7TG9YNRK2cE69T1V51aGAcIqlr44c4jaCm tIHTt1cqIdB0Z4Zp9fPwSixzU3meNLKTIRNYAA/RIouFe+ydEzhvkKvHkogrAFZXtvUr vXFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737120201; x=1737725001; 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=iEfVKjlzcTZY90DixA88DlvdIcpuOzXr0Mq5AmA5lYo=; b=kLDrUqK69Bg6V4f0jt20BhwBPTV5bgwEqLPpeeiQXt2SSSOl5NBOHpmkCicipk1dxR qHciIkawvGDglDXz0PUbI93Z7BvlRlAwzuoBoW6nIeUQpfPWI/q1mSxZOc1GppUzhQtT yGeS7CBDcMHx/br+suOdwwGVLr827KcTVB3pfGmch3i2ERAnZ5SrcVSJy98FrnGxJTua sPjGapQW96jZEoYQTnC2INcqHLRt53AzHdghnQeo6ufmnqLE51TbKOjVSaE9lnviW++m PUGriKreMsT+Is2qr3QYsWRVwWxPOdxbJ9YwYcsv2q5ChdVcTOQhBhzJjO1JAxTTsSZF xPrw== X-Forwarded-Encrypted: i=1; AJvYcCW8/o2gMtUOPI1pwj6dzPXIsjxgS4QjLBNMAtByQP9KDpyMWNT3bhxvdGSOQAWDQqxPhFBpLwz0VuDyStU=@vger.kernel.org X-Gm-Message-State: AOJu0YzDMbBLPmnugwXT5f7Pr3hH92jyXN9HAdUkb722cqYUBxq9hgR2 WetdbV/TXwwaBYZ9soDPyLZ6cBrhV6/8IysB/0iJj0J4VdpKfEiT X-Gm-Gg: ASbGnctYj3ZKgT6h9uXSyzfXjaGGCMXxn6pi/4ud1iHewEFDLwYDrQu0RWYLLNOi1UD fUXrk5fcekrSFo940Z2uyuI69R808YQMOwemWZ6n+Vzp251MGcQbr11Y4liOUWBZeD1Rrsm4m0K 0/ZQA4F/WGjjlpMZCdPaaQS3yV4pZ+Yd89DuZMPWNMxG3VU1RgglI6mQWL5TxAzu+e4E3iGDWsa Q4P9KzFv+rlgOsvW/j8CApD8zCPoXwS0UtmC/gGCQGERZKqUJueP3aaH3WjaHryDmTXyUxmry6P X-Google-Smtp-Source: AGHT+IFKd8+01D4aEEbBu33h3PJyfNoNxKo72xB1ZiQAAH/RCToVN4spyHrnIOp0fscrsHfzRJcX5w== X-Received: by 2002:a17:903:41c4:b0:216:2259:a4bd with SMTP id d9443c01a7336-21c3562a640mr32631985ad.52.1737120199398; Fri, 17 Jan 2025 05:23:19 -0800 (PST) Received: from vaxr-BM6660-BM6360.. ([2001:288:7001:2703:5341:ba8d:225b:c32b]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f77614fe89sm1998451a91.12.2025.01.17.05.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 05:23:18 -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 v2] cpumask: Rephrase comments for cpu_any*() APIs Date: Fri, 17 Jan 2025 21:23:13 +0800 Message-ID: <20250117132313.17266-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. v1 -> v2: - Fix typo for Hoever/However - Drop quotes around 'arbitrary' word Signed-off-by: I Hsin Cheng Reviewed-by: Kuan-Wei Chiu Reviewed-by: Mark Rutland Reviewed-by: Yury Norov Reviewed-by tag. Don't add any tags unless explicitly given. --- 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