Merge branch 'for-5.14/core' into for-linus
[linux-block.git] / include / linux / hid.h
index fb0e4dde6175612b074b6e05607abfe6078ac089..f05bf96a0d21ccae028a861ef190cb858ce86b90 100644 (file)
@@ -1168,8 +1168,7 @@ static inline void hid_hw_wait(struct hid_device *hdev)
  */
 static inline u32 hid_report_len(struct hid_report *report)
 {
-       /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */
-       return ((report->size - 1) >> 3) + 1 + (report->id > 0);
+       return DIV_ROUND_UP(report->size, 8) + (report->id > 0);
 }
 
 int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,