* [PATCH] kprobes: Add missing kerneldoc for __get_insn_slot
@ 2025-07-04 6:38 jiang.peng9
2025-07-15 0:54 ` Masami Hiramatsu
0 siblings, 1 reply; 2+ messages in thread
From: jiang.peng9 @ 2025-07-04 6:38 UTC (permalink / raw)
To: naveen
Cc: anil.s.keshavamurthy, davem, mhiramat, linux-kernel,
linux-trace-kernel, xu.xin16, yang.yang29
From: Peng Jiang <jiang.peng9@zte.com.cn>
Add kerneldoc for '__get_insn_slot' function to fix W=1 warnings:
kernel/kprobes.c:141 function parameter 'c' not described in '__get_insn_slot'
Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
---
kernel/kprobes.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index ffe0c3d52306..ab8f9fc1f0d1 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -135,8 +135,12 @@ struct kprobe_insn_cache kprobe_insn_slots = {
static int collect_garbage_slots(struct kprobe_insn_cache *c);
/**
- * __get_insn_slot() - Find a slot on an executable page for an instruction.
- * We allocate an executable page if there's no room on existing ones.
+ * __get_insn_slot - Find a slot on an executable page for an instruction.
+ * @c: Pointer to kprobe instruction cache
+ *
+ * Description: Locates available slot on existing executable pages,
+ * allocates an executable page if there's no room on existing ones.
+ * Return: Pointer to instruction slot on success, NULL on failure.
*/
kprobe_opcode_t *__get_insn_slot(struct kprobe_insn_cache *c)
{
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kprobes: Add missing kerneldoc for __get_insn_slot
2025-07-04 6:38 [PATCH] kprobes: Add missing kerneldoc for __get_insn_slot jiang.peng9
@ 2025-07-15 0:54 ` Masami Hiramatsu
0 siblings, 0 replies; 2+ messages in thread
From: Masami Hiramatsu @ 2025-07-15 0:54 UTC (permalink / raw)
To: jiang.peng9
Cc: naveen, anil.s.keshavamurthy, davem, mhiramat, linux-kernel,
linux-trace-kernel, xu.xin16, yang.yang29
On Fri, 4 Jul 2025 14:38:17 +0800 (CST)
<jiang.peng9@zte.com.cn> wrote:
> From: Peng Jiang <jiang.peng9@zte.com.cn>
>
> Add kerneldoc for '__get_insn_slot' function to fix W=1 warnings:
>
> kernel/kprobes.c:141 function parameter 'c' not described in '__get_insn_slot'
>
Good catch! Let me pick it for-next.
Thanks!
> Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
> ---
> kernel/kprobes.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index ffe0c3d52306..ab8f9fc1f0d1 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -135,8 +135,12 @@ struct kprobe_insn_cache kprobe_insn_slots = {
> static int collect_garbage_slots(struct kprobe_insn_cache *c);
>
> /**
> - * __get_insn_slot() - Find a slot on an executable page for an instruction.
> - * We allocate an executable page if there's no room on existing ones.
> + * __get_insn_slot - Find a slot on an executable page for an instruction.
> + * @c: Pointer to kprobe instruction cache
> + *
> + * Description: Locates available slot on existing executable pages,
> + * allocates an executable page if there's no room on existing ones.
> + * Return: Pointer to instruction slot on success, NULL on failure.
> */
> kprobe_opcode_t *__get_insn_slot(struct kprobe_insn_cache *c)
> {
> --
> 2.25.1
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-15 0:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-04 6:38 [PATCH] kprobes: Add missing kerneldoc for __get_insn_slot jiang.peng9
2025-07-15 0:54 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®