From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 3E05C149C53 for ; Sat, 18 Jan 2025 07:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737185861; cv=none; b=T/j4CCve1cdkt45kNoj9cLwYsMfTH06DvdEGfhZtCAIFbGroAu6fAhF2iLdUf0Yrhc/BI8bgZJ6k/8P+kqHDO84TX6jRhdvjLov68xAGiF3KBFzyk5I/d7ZIer3QkxPP6KfwvXTq0q0+Rq4uVMFQh+qvWf0IQOYm4+IHgMOLXQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737185861; c=relaxed/simple; bh=xY3quf3wvbSBQraShWJ8nM896E6a7vkQcAEsOY/wjkE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UdBGMcHXqleumNluX0KfMONRPk7J8qzr36nXaW0vM23HbBkyObWHqAMSskEDCp13K3FV+MR/i5wNf+DpVeRplBRmRTqROHJi4CiCS/7k2/OgvLNluDE/so+OrTjRddJ0hh0v8+eVkJUnmM6PnBDXST4d4xr25cjgNcnyJ1O6vwY= 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=NSKEddgd; arc=none smtp.client-ip=209.85.214.178 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="NSKEddgd" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-21631789fcdso50689325ad.1 for ; Fri, 17 Jan 2025 23:37:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737185859; x=1737790659; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rW7oEIZtVZQzxfHupYgkbRH6FOzrnecbCbyDeIE+s9k=; b=NSKEddgd3yBzczUI9C9cKH+8BosS+2L3Nq/1H8bj0mtPy+l0Awry8VAydHuodjxROY Ba85wJku5heLE0C1dOyxox1bjVA5FJGWuK51Dl+yjE44KA34OR6DYiKaBp6h3Drz6cu1 lSYfEwRAwS5Ydbk2hMWeewB4+M+ILTQgUdjiEr9ZS7wyeg0sS2UN/9s3ViGinuSeuA7O jFaVbbUa1+mcrmdPceaoHxUnh1826//6xj9cWGsJeUZjlOU1H33DoWpe9O8tmIUhLBx0 u1oL3/cWZtQnICjAGcOeiNAqpM22dVJDrpKRLqxZQZQFejKFQwN+ysVdRmZGxxggfWmR ZtLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737185859; x=1737790659; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rW7oEIZtVZQzxfHupYgkbRH6FOzrnecbCbyDeIE+s9k=; b=HBqHhuE/nHYqRfu+sLspJn00vnIaUKAGW4+J2NK5ZezlI3SLgYjZO3dO55oa8Xmxox deNRhZ/q+tA0tIrxq3aY4Bt/V2PnEj6f6Kkh7QtJq8bINweCBiwaIoAwZtBOVGe0YaI4 3E2Ncw2CvvPQb+BcI6HV+DurhX+Korgs96P7x4F7VD4QLyrS0a27BWwPM2QobXoN2SK6 FXgUxBOE59vCtmHVRYVJjH9vNfUWppSnHAOtex/r59H19/CHlhFuVsWtCRQbSe/L7B/R DUp8VxBn6SfggwxTURzZUK3KEAhkkOJsK6TIPjobM7XHD8SNjrHa4M+Qnz14wznFf6d5 T+Dw== X-Forwarded-Encrypted: i=1; AJvYcCU8et7kuP02REsheqeTjBRhJC77JssTekqCrvgd9BaymcIvjAV+Nb+Pq2om1Zy6+MfnKKBvH/ZYr4zrvXU=@vger.kernel.org X-Gm-Message-State: AOJu0YyeBtJu3DuEIGX/349Lu4FyTvyiBUPXlZ5zK3ttjOPEWBqQT0WM zpx+4KSTtsaMQ+UfWCsUuDWPJGpZ9c1dRX0GD41XyaZYsZ7FJ6NvfAE8zA== X-Gm-Gg: ASbGnct85KYbYp8SwZ/U86Je0EnZC2wvtD0aLVmRK9V6mx+HMUXkgMKg5eAGCV5gal7 9I7B5PAQr+Y3IQRqM0PC3+t/5eO6hmBu+DE+L4ggHWbB/GyWZuyqd5Vm47ogD0yBdFyW/3eB/eq 5iMwEVAjIWQami7ybnmiag/xWC8JaAHzM5EGZnzJlLjTvdjGw+HKDbcebmSQs6vpfbrLOzWnepX vD1+Z4M4UQBHAimP6yCyJIa52IdSNW/51Zhi8crXyl74+Asec/SL77X5x//v8LpSQM/YDqi6VG5 70khpj6C1UnHO9QlhbSSGQ== X-Google-Smtp-Source: AGHT+IELXBOoA7qh+EOcONEMrNF/0/bTJ8H6CG+f7DnS1yuU+hJ8p01RG7SVTDt4/h07xQtuuYq//Q== X-Received: by 2002:a05:6a20:6a0b:b0:1e1:a789:1b4d with SMTP id adf61e73a8af0-1eb21711b91mr7817145637.15.1737185859317; Fri, 17 Jan 2025 23:37:39 -0800 (PST) Received: from visitorckw-System-Product-Name ([140.113.216.168]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72dab7f044esm3143582b3a.2.2025.01.17.23.37.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2025 23:37:38 -0800 (PST) Date: Sat, 18 Jan 2025 15:37:35 +0800 From: Kuan-Wei Chiu To: Yury Norov Cc: I Hsin Cheng , mark.rutland@arm.com, linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org, jserv@ccns.ncku.edu.tw Subject: Re: [PATCH v3] cpumask: Rephrase comments for cpu_any*() APIs Message-ID: References: <20250117142724.17657-1-richard120310@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Yury, On Fri, Jan 17, 2025 at 01:36:29PM -0500, Yury Norov wrote: > On Fri, Jan 17, 2025 at 10:27:24PM +0800, I Hsin Cheng wrote: > > 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 > > There's no cpu_any* API. I replaced it with cpumask_any* and applied > in bitmap-for-next. > The same issue exists in the subject title: cpu_any*() -> cpumask_any*(). Could you amend it on bitmap-for-next? Thanks. Reagrds, Kuan-Wei > > > 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 struct cpumask *mask, int sta > > for_each_set_bit_from(cpu, cpumask_bits(mask), small_cpumask_bits) > > > > /** > > - * 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) > > } > > > > /** > > - * 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 cpumask *srcp) > > } > > > > /** > > - * cpumask_any - pick a "random" cpu from *srcp > > + * cpumask_any - pick an arbitrary cpu from *srcp > > * @srcp: the input cpumask > > * > > * Return: >= nr_cpu_ids if no cpus set. > > @@ -848,7 +848,7 @@ void cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp) > > #define cpumask_any(srcp) cpumask_first(srcp) > > > > /** > > - * 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 > > * > > -- > > 2.43.0