diff mbox series

mm: Fixed incorrect comment for _kmem_cache_create function

Message ID DM6PR22MB1836D8C5348D28989105DADBC5959@DM6PR22MB1836.namprd22.prod.outlook.com (mailing list archive)
State New
Headers show
Series mm: Fixed incorrect comment for _kmem_cache_create function | expand

Commit Message

zhaoxinchao April 10, 2023, 9:01 a.m. UTC
From: zhaoxinchao <chrisxinchao@outlook.com>

Actually __kmem_cache_create() returns a status :
0 is success
others are failed.

Signed-off-by: zhaoxinchao <chrisxinchao@outlook.com>
---
 mm/slab.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bagas Sanjaya April 10, 2023, 2:05 p.m. UTC | #1
On Mon, Apr 10, 2023 at 05:01:42PM +0800, zhaoxinchao wrote:
> - * Returns a ptr to the cache on success, NULL on failure.
> + * Returns zero on success, others on failure.

Can you explain what these other return values are? I have skimmed on
__kmem_cache_create() kerneldoc and the function returns error in that
case.
diff mbox series

Patch

diff --git a/mm/slab.c b/mm/slab.c
index ca4822f6b..65985f767 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1901,7 +1901,7 @@  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, others on failure.
  * Cannot be called within a int, but can be interrupted.
  * The @ctor is run when new pages are allocated by the cache.
  *