aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorNiklas Neronin <[email protected]>2024-04-29 17:02:32 +0300
committerGreg Kroah-Hartman <[email protected]>2024-05-01 08:47:14 +0200
commit5adc1cc038f4446b11dd260e0a848fdeaac12306 (patch)
tree1499e5033bc3ad9cfda98d7cd50d0ef8e43f2c4e /scripts/generate_rust_analyzer.py
parent577c867cf8f638b05f5676ed06a1ffe9afbba896 (diff)
usb: xhci: address off-by-one in xhci_num_trbs_free()
Reduce the number of do-while loops by 1. The number of loops should be number of segment + 1, the +1 is in case deq and enq are on the same segment. But due to the use of a do-while loop, the expression is evaluated after executing the loop, thus the loop is executed 1 extra time. Changing the do-while loop expression from "<=" to "<", reduces the loop amount by 1. The expression "<=" would also work if it was a while loop instead of a do-while loop. Signed-off-by: Niklas Neronin <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions