Skip to content

Commit 12f33ef

Browse files
AlanSternBenjamin Tissoires
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 4051ead commit 12f33ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

include/linux/hid.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,11 @@ static inline void hid_hw_wait(struct hid_device *hdev)
12161216
/**
12171217
* hid_report_len - calculate the report length
12181218
*
1219-
* @report: the report we want to know the length
1219+
* @report: the report whose length we want to know
1220+
*
1221+
* The length counts the report ID byte, but only if the ID is nonzero
1222+
* and therefore is included in the report. Reports whose ID is zero
1223+
* never include an ID byte.
12201224
*/
12211225
static inline u32 hid_report_len(struct hid_report *report)
12221226
{

0 commit comments

Comments
 (0)