aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorNiklas Neronin <niklas.neronin@linux.intel.com>2025-03-06 16:49:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-06 16:46:16 +0100
commit55741c723318905e6d5161bf1e12749020b161e3 (patch)
tree2258a6e8b5ac42a87b711d6eb83069d920d381b5 /tools/perf/scripts/python/export-to-postgresql.py
parentusb: xhci: Skip only one TD on Ring Underrun/Overrun (diff)
downloadlinux-rng-55741c723318905e6d5161bf1e12749020b161e3.tar.xz
linux-rng-55741c723318905e6d5161bf1e12749020b161e3.zip
usb: xhci: correct debug message page size calculation
The ffs() function returns the index of the first set bit, starting from 1. If no bits are set, it returns zero. This behavior causes an off-by-one page size in the debug message, as the page size calculation [1] is zero-based, while ffs() is one-based. Fix this by subtracting one from the result of ffs(). Note that since variable 'val' is unsigned, subtracting one from zero will result in the maximum unsigned integer value. Consequently, the condition 'if (val < 16)' will still function correctly. [1], Page size: (2^(n+12)), where 'n' is the set page size bit. Fixes: 81720ec5320c ("usb: host: xhci: use ffs() in xhci_mem_init()") Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250306144954.3507700-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions