]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: xhci: rename 'wIndex' parameters to 'portnum'
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Thu, 2 Apr 2026 13:13:31 +0000 (16:13 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 13:55:37 +0000 (15:55 +0200)
commitec5521a77167cc258bd4a587756f11d66b05a4c2
tree3180368ac419b530a639e793fae6a8d00b9e1df7
parent1e6138c0654334d42b3984f1154ee35234f35302
usb: xhci: rename 'wIndex' parameters to 'portnum'

Several helper functions take a parameter named 'wIndex', but the
value they receive is not the raw USB request wIndex field. The only
function that actually processes the USB hub request parameter is
xhci_hub_control(), which extracts the relevant port number (and other
upper-byte fields) before passing them down.

To avoid confusion between the USB request parameter and the derived
0-based port index, rename all such function parameters from 'wIndex'
to 'portnum'. This improves readability and makes the call intentions
clearer.

When a function accept struct 'xhci_port' pointer, use its port number
instead.

Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://patch.msgid.link/20260402131342.2628648-15-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c