diff options
author | 2021-09-01 12:36:06 -0400 | |
---|---|---|
committer | 2021-09-01 20:52:32 +0200 | |
commit | d2f311ec91984adb219ac6985d4dd72c37ae734d (patch) | |
tree | 7164eabfbb51ff5d7a8876c2b1ff481af854de19 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | HID: usbhid: Fix warning caused by 0-length input reports (diff) | |
download | linux-dev-d2f311ec91984adb219ac6985d4dd72c37ae734d.tar.xz linux-dev-d2f311ec91984adb219ac6985d4dd72c37ae734d.zip |
HID: usbhid: Simplify code in hid_submit_ctrl()
This patch makes a small simplification to the code in
hid_submit_ctrl(). The test for maxpacket being > 0 is unnecessary,
because endpoint 0 always has a maxpacket value which is >= 8.
Furthermore, endpoint 0's maxpacket value is always a power of 2, so
instead of open-coding the round-to-next-multiple computation we can
call the optimized round_up() routine.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions