Skip to contentSkip to conversation

docs: android: Fix missing kernel-doc entries in binder.c

PATCH Superseded Kriish Sharma 2 participants 3 messages Sep 25, 2025 – Oct 3, 2025 Android drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: android: Fix missing kernel-doc entries in binder.c

Fix several kernel-doc warnings in drivers/android/binder.c caused by undocumented struct members and function parameters.

In particular, add missing documentation for the @thread parameter in binder_free_buf_locked().

---
 drivers/android/binder.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/android/binder.c +9 -8
index 312b462e349d..d30d27bfc634 100644
@@ -2417,10 +2417,10 @@ static int binder_translate_fd(u32 fd, binder_size_t fd_offset,
 
 /**
  * struct binder_ptr_fixup - data to be fixed-up in target buffer
- * @offset	offset in target buffer to fixup
- * @skip_size	bytes to skip in copy (fixup will be written later)
- * @fixup_data	data to write at fixup offset
- * @node	list node
+ * @offset:	offset in target buffer to fixup
+ * @skip_size:	bytes to skip in copy (fixup will be written later)
+ * @fixup_data:	data to write at fixup offset
+ * @node:	list node
  *
  * This is used for the pointer fixup list (pf) which is created and consumed
  * during binder_transaction() and is only accessed locally. No
@@ -2437,10 +2437,10 @@ struct binder_ptr_fixup {
 
 /**
  * struct binder_sg_copy - scatter-gather data to be copied
- * @offset		offset in target buffer
- * @sender_uaddr	user address in source buffer
- * @length		bytes to copy
- * @node		list node
+ * @offset:		offset in target buffer
+ * @sender_uaddr:	user address in source buffer
+ * @length:		bytes to copy
+ * @node:		list node
  *
  * This is used for the sg copy list (sgc) which is created and consumed
  * during binder_transaction() and is only accessed locally. No
@@ -3997,6 +3997,7 @@ binder_freeze_notification_done(struct binder_proc *proc,
  * @proc:	binder proc that owns buffer
  * @buffer:	buffer to be freed
  * @is_failure:	failed to send transaction
+ * @thread: binder thread performing the buffer release
  *
  * If buffer for an async transaction, enqueue the next async
  * transaction from the node.
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 46 lines · Kriish Sharma

Fix several kernel-doc warnings in drivers/android/binder.c caused by undocumented struct members and function parameters.

In particular, add missing documentation for the @thread parameter in binder_free_buf_locked().

---
 drivers/android/binder.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/android/binder.c +8 -8
index 312b462e349d..d30d27bfc634 100644
@@ -2417,10 +2417,10 @@ static int binder_translate_fd(u32 fd, binder_size_t fd_offset,
 
 /**
  * struct binder_ptr_fixup - data to be fixed-up in target buffer
- * @offset	offset in target buffer to fixup
- * @skip_size	bytes to skip in copy (fixup will be written later)
- * @fixup_data	data to write at fixup offset
- * @node	list node
+ * @offset:	offset in target buffer to fixup
+ * @skip_size:	bytes to skip in copy (fixup will be written later)
+ * @fixup_data:	data to write at fixup offset
+ * @node:	list node
  *
  * This is used for the pointer fixup list (pf) which is created and consumed
  * during binder_transaction() and is only accessed locally. No
@@ -2437,10 +2437,10 @@ struct binder_ptr_fixup {
 
 /**
  * struct binder_sg_copy - scatter-gather data to be copied
- * @offset		offset in target buffer
- * @sender_uaddr	user address in source buffer
- * @length		bytes to copy
- * @node		list node
+ * @offset:		offset in target buffer
+ * @sender_uaddr:	user address in source buffer
+ * @length:		bytes to copy
+ * @node:		list node
  *
  * This is used for the sg copy list (sgc) which is created and consumed
  * during binder_transaction() and is only accessed locally. No

drivers/android/binder.c binder_freeze_notification_done(struct binder_proc *proc, · line 4000

Quoted 4 lines
drivers/android/binder.c +1 -0
@@ -3997,6 +3997,7 @@ binder_freeze_notification_done(struct binder_proc *proc,
  * @proc:	binder proc that owns buffer
  * @buffer:	buffer to be freed
  * @is_failure:	failed to send transaction
+ * @thread: binder thread performing the buffer release

This is missing the alignment that other members have. Also, please keep the same order of the arguments, so @thread should go after @proc.

Quoted 6 lines
drivers/android/binder.c +0 -0
  *
  * If buffer for an async transaction, enqueue the next async
  * transaction from the node.
Signature · 1 line
2.34.1

BTW, your subject is "docs: android:" which makes me think this is part of Documentation/. Please just use "binder:" instead.

Thanks,
Carlos Llamas

#2 lore raw

Hi Carlos,

Thanks for the feedback. I’ll update the patch with the correct subject, align @thread, and reorder it after @proc. Will post v2 soon.

Best,
Kriish

Quoted 68 lines · Carlos Llamas
Quoted 46 lines · Kriish Sharma

Fix several kernel-doc warnings in drivers/android/binder.c caused by undocumented struct members and function parameters.

In particular, add missing documentation for the @thread parameter in binder_free_buf_locked().

---
 drivers/android/binder.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
drivers/android/binder.c +8 -8
index 312b462e349d..d30d27bfc634 100644
@@ -2417,10 +2417,10 @@ static int binder_translate_fd(u32 fd, binder_size_t fd_offset,
 
 /**
  * struct binder_ptr_fixup - data to be fixed-up in target buffer
- * @offset   offset in target buffer to fixup
- * @skip_size        bytes to skip in copy (fixup will be written later)
- * @fixup_data       data to write at fixup offset
- * @node     list node
+ * @offset:  offset in target buffer to fixup
+ * @skip_size:       bytes to skip in copy (fixup will be written later)
+ * @fixup_data:      data to write at fixup offset
+ * @node:    list node
  *
  * This is used for the pointer fixup list (pf) which is created and consumed
  * during binder_transaction() and is only accessed locally. No
@@ -2437,10 +2437,10 @@ struct binder_ptr_fixup {
 
 /**
  * struct binder_sg_copy - scatter-gather data to be copied
- * @offset           offset in target buffer
- * @sender_uaddr     user address in source buffer
- * @length           bytes to copy
- * @node             list node
+ * @offset:          offset in target buffer
+ * @sender_uaddr:    user address in source buffer
+ * @length:          bytes to copy
+ * @node:            list node
  *
  * This is used for the sg copy list (sgc) which is created and consumed
  * during binder_transaction() and is only accessed locally. No

drivers/android/binder.c binder_freeze_notification_done(struct binder_proc *proc, · line 4000

Quoted 4 lines
drivers/android/binder.c +1 -0
@@ -3997,6 +3997,7 @@ binder_freeze_notification_done(struct binder_proc *proc,
  * @proc:    binder proc that owns buffer
  * @buffer:  buffer to be freed
  * @is_failure:      failed to send transaction
+ * @thread: binder thread performing the buffer release

This is missing the alignment that other members have. Also, please keep the same order of the arguments, so @thread should go after @proc.

Quoted 6 lines
drivers/android/binder.c +0 -1
  *
  * If buffer for an async transaction, enqueue the next async
  * transaction from the node.
--

2.34.1

BTW, your subject is "docs: android:" which makes me think this is part of Documentation/. Please just use "binder:" instead.

Thanks,
Carlos Llamas