usb: xhci: remove duplicate code from 'xhci_clear_command_ring()'
authorNiklas Neronin <niklas.neronin@linux.intel.com>
Thu, 29 Feb 2024 14:14:33 +0000 (16:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Mar 2024 19:25:27 +0000 (20:25 +0100)
commit00bdc4a34b2885f54468d4bdbb56d4055ce20ac9
treefbc6a4ddc29066efe9413d36741ae72e3fd79af7
parent74151b5349266bd1a3a8307a05449a22bf0ba9de
usb: xhci: remove duplicate code from 'xhci_clear_command_ring()'

Replace a segment of code within 'xhci_clear_command_ring()' with a
function call to 'xhci_initialize_ring_info()'. This change eliminates
code duplication, as 'xhci_initialize_ring_info()' performs the same
operations as the replaced code.

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/20240229141438.619372-5-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c