From patchwork Mon Jul 24 02:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 124588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1544382vqg; Sun, 23 Jul 2023 20:22:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGYnxiJHW5zkSQDknUq15p3B/krbul7ehexaR4czUNt2E/FdNEBJfCKrE3a/6fLYGB3kWjf X-Received: by 2002:a17:90b:1e53:b0:262:ebfd:ce44 with SMTP id pi19-20020a17090b1e5300b00262ebfdce44mr7829465pjb.34.1690168949193; Sun, 23 Jul 2023 20:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690168949; cv=none; d=google.com; s=arc-20160816; b=Q1lJJpxl83OZ7nf/Lkb2qggwHAASyud83X5HyasNCsWCUw/UIDAQyb6re7urD0lZrI 73UomZoGEcCUs+ZeQsQ7xbEcwjABjiM/vPWUUj4mXAHoEoxp4mS9lwfuxx5lGjIyMB9q GAkuNSMO0R9Yrqa9ZmSdSl1gGsh4jU9dtK4Tt9WuS5JqxPyaEKK04KZdr2LEcfAfp1DD HbeUvwlrG9AEFWjM7Vvy8wCMduO9gECHesGmM24rLKVsVw8gCFhT5C/fhCiE8ZN7FOsS oxYFXw9pSLctisOzAQ6KoYHuF7MCR0yR+6z5Auv5T6JW/oChstFW0Gibs2vqHMcPplN/ TU0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fToTzt+EUMm0xtTs4UdTiNvO0w2wvNkq6fVJpJWCIds=; fh=ng8LCVjACgPsH/xdC6mWEYP3VwTLfZuWROrI7j1+imc=; b=xKP30X8oFDgYfFXHsSE7p3t2L8QEkllblGwBQpAEPhiIWq7MRTzypFUD78LzE5Vdcz +AvkxlEjy0G7z9pvUBj8Jk7FuVR3VzXtSsn7wDkYO9nCculpyhdu/zrkN+nUizJ3LgpX Oj7eqX7cHLYoY5FBuVfadQnf95bohpv1/1ZZ954k/hHrCqZ2CiPuALH/qzexZzoSpfCj OxnYblbRz2OZ11VNGi94expfqH8SmnkV2asCY0k731COzXh6EzV2TxTSdhfh9FVrkqPr c/uSFI62vnLKQzxE4b3mw0G1pEttGLnRpQBCMgSXsP9DufVyEwy/xiE7isPJkbKLYxSC t2kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lsS+vkRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a17090aad8400b002681ffd2f97si709258pjq.90.2023.07.23.20.22.13; Sun, 23 Jul 2023 20:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=lsS+vkRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbjGXCeW (ORCPT + 99 others); Sun, 23 Jul 2023 22:34:22 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772270595777051803 X-GMAIL-MSGID: 1772270595777051803 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 >= nr_cpu_ids on completion + * Return: >= 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=y, 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 returned + * Return: online CPU according to a numa aware policy; local cpus are returned * 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 >= nr_cpu_ids if the intersection is empty. + * Return: >= 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); +/** + * cpumask_any_distribute - Return an arbitrary cpu from srcp + * @srcp: &cpumask for selection + * + * Return: >= nr_cpu_ids if the intersection is empty. + */ unsigned int cpumask_any_distribute(const struct cpumask *srcp) { unsigned int next, prev;