From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@gentwo.org>,
David Rientjes <rientjes@google.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Harry Yoo <harry.yoo@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Sanjay Chitroda <sanjayembeddedse@gmail.com>
Subject: [PATCH] mm/slub: drop duplicate kernel-doc for ksize()
Date: Fri, 20 Feb 2026 18:12:43 +0530 [thread overview]
Message-ID: <20260220124243.3264133-1-sanjayembedded@gmail.com> (raw)
From: Sanjay Chitroda <sanjayembeddedse@gmail.com>
The ksize() API is already documented in the public header, and
Documentation/core-api/mm-api.rst pulls that canonical doc into the
book. The kernel-doc block added to mm/slub.c by commit
fab0694646d7 ("mm/slab: move [__]ksize and slab_ksize() to mm/slub.c")
introduced a second definition for the same symbol in the generated
docs, which makes Sphinx emit:
WARNING: Duplicate C declaration, also defined at core-api/mm-api:521
Declaration is '.. c:function:: size_t ksize(const void *objp)'
Remove the redundant kernel-doc comment from slub.c so only the
header-provided documentation is emitted. This keeps the user-visible
API documentation intact while eliminating the duplicate-declaration
warning during `make htmldocs`.
No functional change.
Fixes: fab0694646d7 ("mm/slab: move [__]ksize and slab_ksize() to mm/slub.c")
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com>
---
mm/slub.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 865bc050f654..3f58a485e95e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -6309,18 +6309,6 @@ static size_t __ksize(const void *object)
return slab_ksize(slab);
}
-/**
- * ksize -- Report full size of underlying allocation
- * @objp: pointer to the object
- *
- * This should only be used internally to query the true size of allocations.
- * It is not meant to be a way to discover the usable size of an allocation
- * after the fact. Instead, use kmalloc_size_roundup(). Using memory beyond
- * the originally requested allocation size may trigger KASAN, UBSAN_BOUNDS,
- * and/or FORTIFY_SOURCE.
- *
- * Return: size of the actual memory used by @objp in bytes
- */
size_t ksize(const void *objp)
{
/*
--
2.34.1
reply other threads:[~2026-02-20 12:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260220124243.3264133-1-sanjayembedded@gmail.com \
--to=sanjayembeddedse@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=harry.yoo@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--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