From: zhao xinchao <ChrisXinchao@outlook.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"cl@linux.com" <cl@linux.com>,
"iamjoonsoo.kim@lge.com" <iamjoonsoo.kim@lge.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"penberg@kernel.org" <penberg@kernel.org>,
"rientjes@google.com" <rientjes@google.com>,
"vbabka@suse.cz" <vbabka@suse.cz>
Subject: 答复: [PATCH v2] mm: Fixed incorrect comment for _kmem_cache_create function
Date: Wed, 12 Apr 2023 06:17:43 +0000 [thread overview]
Message-ID: <DM6PR22MB183695C5151EE3E3E749763AC59B9@DM6PR22MB1836.namprd22.prod.outlook.com> (raw)
In-Reply-To: <aac1fa88-46bb-08ab-35e7-75e44b8d28b5@gmail.com>
I don't think kmem_cache_create is associated with __kmem_cache_create,
__kmem_cache_create is not exported as an API, it is a function called internally by the kernel.
So the kernel documentation does not document this internal interface.
-----邮件原件-----
发件人: Bagas Sanjaya [mailto:bagasdotme@gmail.com]
发送时间: 2023年4月12日 11:40
收件人: zhaoxinchao <ChrisXinchao@outlook.com>
抄送: akpm@linux-foundation.org; cl@linux.com; iamjoonsoo.kim@lge.com; linux-kernel@vger.kernel.org; linux-mm@kvack.org; penberg@kernel.org; rientjes@google.com; vbabka@suse.cz
主题: Re: [PATCH v2] mm: Fixed incorrect comment for _kmem_cache_create function
On 4/11/23 16:13, zhaoxinchao wrote:
> diff --git a/mm/slab.c b/mm/slab.c
> index edbe722fb..399daa4d0 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -1893,7 +1893,12 @@ static bool set_on_slab_cache(struct kmem_cache *cachep,
> * @cachep: cache management descriptor
> * @flags: SLAB flags
> *
> - * Returns a ptr to the cache on success, NULL on failure.
> + * Returns zero on success, nonzero on failure.
> + * This function has three return positions.
> + * In addition to successfully return 0, the
> + * first failed position will return - E2BIG,
> + * and the second position will return nonzero
> + * value for setup_cpu_cache function failure.
> * Cannot be called within an int, but can be interrupted.
> * The @ctor is run when new pages are allocated by the cache.
> *
I don't see any visible changes in my htmldocs build (since the kernel-doc is for inline version of kmem_cache_create()).
You will also need to update kernel-doc comment for
kmem_cache_create_usercopy() and kmem_cache_create() in mm/slab_common.c. Since the latter function is actually a wrapper on the former, the return value description (Return: field) should be same on both.
Thanks.
--
An old man doll... just what I always wanted! - Clara
next prev parent reply other threads:[~2023-04-12 6:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 9:01 [PATCH] " zhaoxinchao
2023-04-10 14:05 ` Bagas Sanjaya
2023-04-11 9:13 ` [PATCH v2] " zhaoxinchao
2023-04-12 3:40 ` Bagas Sanjaya
2023-04-12 6:17 ` zhao xinchao [this message]
2023-04-17 15:47 ` Vlastimil Babka
2023-04-18 2:05 ` [PATCH v3] " zhaoxinchao
2023-04-18 7:10 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR22MB183695C5151EE3E3E749763AC59B9@DM6PR22MB1836.namprd22.prod.outlook.com \
--to=chrisxinchao@outlook.com \
--cc=akpm@linux-foundation.org \
--cc=bagasdotme@gmail.com \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox