Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: xhci: make 'sbrn' a local variable

Variable 'sbrn' is used to store the Serial Bus Release Number, which is
then only used for a debug message. Thus, 'sbrn' can be a local variable
and assigned after the primary HCD check. The SBRN debug message is only
printed when a primary HCD is setup.

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/20240905143300.1959279-8-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Niklas Neronin and committed by
Greg Kroah-Hartman
811cd6ed b14485d4

+3 -4
+3 -3
drivers/usb/host/xhci-pci.c
··· 525 525 struct xhci_hcd *xhci; 526 526 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); 527 527 int retval; 528 + u8 sbrn; 528 529 529 530 xhci = hcd_to_xhci(hcd); 530 - if (!xhci->sbrn) 531 - pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn); 532 531 533 532 /* imod_interval is the interrupt moderation value in nanoseconds. */ 534 533 xhci->imod_interval = 40000; ··· 542 543 if (xhci->quirks & XHCI_PME_STUCK_QUIRK) 543 544 xhci_pme_acpi_rtd3_enable(pdev); 544 545 545 - xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int) xhci->sbrn); 546 + pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &sbrn); 547 + xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int)sbrn); 546 548 547 549 /* Find any debug ports */ 548 550 return xhci_pci_reinit(xhci, pdev);
-1
drivers/usb/host/xhci.h
··· 1498 1498 spinlock_t lock; 1499 1499 1500 1500 /* packed release number */ 1501 - u8 sbrn; 1502 1501 u16 hci_version; 1503 1502 u16 max_interrupters; 1504 1503 /* imod_interval in ns (I * 250ns) */