From nobody Sun Feb 8 12:14:43 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ED77C001DE for ; Mon, 24 Jul 2023 02:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbjGXCeX (ORCPT ); Sun, 23 Jul 2023 22:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbjGXCeR (ORCPT ); Sun, 23 Jul 2023 22:34:17 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38ED4180 for ; Sun, 23 Jul 2023 19:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=fToTzt+EUMm0xtTs4UdTiNvO0w2wvNkq6fVJpJWCIds=; b=lsS+vkRN6+2q7LGYzWhw6W05aY 04Dsl/4gnKtjwQurYx5NQYKajcG54EjjGvmOvFel2N2AppQVS4+3tJi/AwshkhfOJ6gmQwYrgsKOT 9Kh/+O32BIjJMsXU85Qw3I7PSesptExA2nfQ/SICiFU8EYR9TtsHxabuBm3lgT+b7uuXInkD+6UWR jbu0nJHWBt9UiaOWvK3dR8ssJBONzYF9EAZT/zcb8WGGJVTa2/maMIcOlDClJ9eVhfYzoz83KghcW dpaS0PEW1UYDqFhj5tflNBK0iQYyCHBJ3RMTyPn+uaomI6UJ8iYx0HmKvez57DhxjCCwjkLaHFTiD OiaAZGDw==; Received: from 50-198-160-193-static.hfc.comcastbusiness.net ([50.198.160.193] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qNlOo-002XtI-2k; Mon, 24 Jul 2023 02:34:14 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org, Yury Norov , Andy Shevchenko , Rasmus Villemoes Cc: Randy Dunlap Subject: [PATCH] cpumask: kernel-doc additions in cpumask.c Date: Sun, 23 Jul 2023 19:34:14 -0700 Message-ID: <20230724023414.24882-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add Return: value for 4 functions. Add kernel-doc for cpumask_any_distribute(). Signed-off-by: Randy Dunlap Cc: Yury Norov Cc: Andy Shevchenko Cc: Rasmus Villemoes Reviewed-by: Andy Shevchenko --- lib/cpumask.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) --- linux-next-20230720.orig/lib/cpumask.c +++ linux-next-20230720/lib/cpumask.c @@ -14,7 +14,7 @@ * @start: the start point of the iteration * @wrap: assume @n crossing @start terminates the iteration * - * Returns >=3D nr_cpu_ids on completion + * Return: >=3D nr_cpu_ids on completion * * Note: the @wrap argument is required for the start condition when * we cannot assume @start is set in @mask. @@ -48,8 +48,9 @@ EXPORT_SYMBOL(cpumask_next_wrap); * @node: memory node from which to allocate or %NUMA_NO_NODE * * Only defined when CONFIG_CPUMASK_OFFSTACK=3Dy, otherwise is - * a nop returning a constant 1 (in ) - * Returns TRUE if memory allocation succeeded, FALSE otherwise. + * a nop returning a constant 1 (in ). + * + * Return: TRUE if memory allocation succeeded, FALSE otherwise. * * In addition, mask will be NULL if this fails. Note that gcc is * usually smart enough to know that mask can never be NULL if @@ -115,7 +116,7 @@ void __init free_bootmem_cpumask_var(cpu * @i: index number * @node: local numa_node * - * Returns online CPU according to a numa aware policy; local cpus are ret= urned + * Return: online CPU according to a numa aware policy; local cpus are ret= urned * first, followed by non-local ones, then it wraps around. * * For those who wants to enumerate all CPUs based on their NUMA distances, @@ -162,7 +163,7 @@ static DEFINE_PER_CPU(int, distribute_cp * Iterated calls using the same srcp1 and srcp2 will be distributed within * their intersection. * - * Returns >=3D nr_cpu_ids if the intersection is empty. + * Return: >=3D nr_cpu_ids if the intersection is empty. */ unsigned int cpumask_any_and_distribute(const struct cpumask *src1p, const struct cpumask *src2p) @@ -181,6 +182,12 @@ unsigned int cpumask_any_and_distribute( } EXPORT_SYMBOL(cpumask_any_and_distribute); =20 +/** + * cpumask_any_distribute - Return an arbitrary cpu from srcp + * @srcp: &cpumask for selection + * + * Return: >=3D nr_cpu_ids if the intersection is empty. + */ unsigned int cpumask_any_distribute(const struct cpumask *srcp) { unsigned int next, prev;