linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: core: Improve the kerneldoc for hid_report_len()
       [not found] ` <175239324234.1701499.15395216375379684975.b4-ty@kernel.org>
@ 2025-07-13 15:36   ` Alan Stern
  2025-07-15 15:29     ` (subset) " Benjamin Tissoires
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2025-07-13 15:36 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jiri Kosina, linux-input, USB mailing list

The kerneldoc for hid_report_len() needs to be improved.  The
description of the @report argument is ungrammatical, and the
documentation does not explain under what circumstances the report
length will include the byte reserved for the report ID.

Let's fix up the kerneldoc.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---

 include/linux/hid.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: usb-devel/include/linux/hid.h
===================================================================
--- usb-devel.orig/include/linux/hid.h
+++ usb-devel/include/linux/hid.h
@@ -1216,7 +1216,11 @@ static inline void hid_hw_wait(struct hi
 /**
  * hid_report_len - calculate the report length
  *
- * @report: the report we want to know the length
+ * @report: the report whose length we want to know
+ *
+ * The length counts the report ID byte, but only if the ID is nonzero
+ * and therefore is included in the report.  Reports whose ID is zero
+ * never include an ID byte.
  */
 static inline u32 hid_report_len(struct hid_report *report)
 {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: (subset) [PATCH] HID: core: Improve the kerneldoc for hid_report_len()
  2025-07-13 15:36   ` [PATCH] HID: core: Improve the kerneldoc for hid_report_len() Alan Stern
@ 2025-07-15 15:29     ` Benjamin Tissoires
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Tissoires @ 2025-07-15 15:29 UTC (permalink / raw)
  To: Alan Stern; +Cc: Jiri Kosina, linux-input, USB mailing list

On Sun, 13 Jul 2025 11:36:12 -0400, Alan Stern wrote:
> The kerneldoc for hid_report_len() needs to be improved.  The
> description of the @report argument is ungrammatical, and the
> documentation does not explain under what circumstances the report
> length will include the byte reserved for the report ID.
> 
> Let's fix up the kerneldoc.
> 
> [...]

Applied to hid/hid.git (for-6.17/core), thanks!

[1/1] HID: core: Improve the kerneldoc for hid_report_len()
      https://git.kernel.org/hid/hid/c/12f33ef6c2aa

Cheers,
-- 
Benjamin Tissoires <bentiss@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-15 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250710-report-size-null-v2-0-ccf922b7c4e5@kernel.org>
     [not found] ` <175239324234.1701499.15395216375379684975.b4-ty@kernel.org>
2025-07-13 15:36   ` [PATCH] HID: core: Improve the kerneldoc for hid_report_len() Alan Stern
2025-07-15 15:29     ` (subset) " Benjamin Tissoires

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).