diff options
author | zhaoxinchao <chrisxinchao@outlook.com> | 2023-04-18 10:05:23 +0800 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2023-05-22 15:17:19 +0200 |
commit | 444f20c29e8b41a5aef5c34e3eab84e8d1cc4511 (patch) | |
tree | fc2daf8eabe90feb79525a92ea2a67548b5fae08 /mm/slab.c | |
parent | 44c026a73be8038f03dbdeef028b642880cf1511 (diff) | |
download | linux-starfive-444f20c29e8b41a5aef5c34e3eab84e8d1cc4511.tar.gz linux-starfive-444f20c29e8b41a5aef5c34e3eab84e8d1cc4511.tar.bz2 linux-starfive-444f20c29e8b41a5aef5c34e3eab84e8d1cc4511.zip |
mm/slab: correct return values in comment for _kmem_cache_create()
__kmem_cache_create() returns 0 on success and non-zero on failure.
The comment is wrong in two instances, so fix the first one and remove
the second one. Also make the comment non-doc, because it doesn't
describe an API function, but SLAB-specific implementation.
Signed-off-by: zhaoxinchao <chrisxinchao@outlook.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mm/slab.c b/mm/slab.c index bb57f7fdbae1..30d241908739 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -1887,14 +1887,12 @@ static bool set_on_slab_cache(struct kmem_cache *cachep, return true; } -/** +/* * __kmem_cache_create - Create a cache. * @cachep: cache management descriptor * @flags: SLAB flags * - * Returns a ptr to the cache on success, NULL on failure. - * Cannot be called within an int, but can be interrupted. - * The @ctor is run when new pages are allocated by the cache. + * Returns zero on success, nonzero on failure. * * The flags are * @@ -1907,8 +1905,6 @@ static bool set_on_slab_cache(struct kmem_cache *cachep, * %SLAB_HWCACHE_ALIGN - Align the objects in this cache to a hardware * cacheline. This can be beneficial if you're counting cycles as closely * as davem. - * - * Return: a pointer to the created cache or %NULL in case of error */ int __kmem_cache_create(struct kmem_cache *cachep, slab_flags_t flags) { |