summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2025-07-13 11:36:12 -0400
committerBenjamin Tissoires <bentiss@kernel.org>2025-07-15 17:28:27 +0200
commit12f33ef6c2aaa410b7ccf039289fe2b04ab2252f (patch)
treeb025bb6e54db0b296415b203bb59ed078dd9f702 /include
parent4051ead99888f101be92c7ce90d2de09aac6fd1c (diff)
HID: core: Improve the kerneldoc for hid_report_len()
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> Link: https://patch.msgid.link/1c8416cb-7347-4a06-b00a-20518069d263@rowland.harvard.edu Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hid.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 7f260e0e2049..2cc4f1e4ea96 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1216,7 +1216,11 @@ static inline void hid_hw_wait(struct hid_device *hdev)
/**
* 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)
{