Commit 81720ec5 authored by Linyu Yuan's avatar Linyu Yuan Committed by Greg Kroah-Hartman
Browse files

usb: host: xhci: use ffs() in xhci_mem_init()

parent 70c05e4c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -2391,11 +2391,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
	page_size = readl(&xhci->op_regs->page_size);
	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
			"Supported page size register = 0x%x", page_size);
	for (i = 0; i < 16; i++) {
		if ((0x1 & page_size) != 0)
			break;
		page_size = page_size >> 1;
	}
	i = ffs(page_size);
	if (i < 16)
		xhci_dbg_trace(xhci, trace_xhci_dbg_init,
			"Supported page size of %iK", (1 << (i+12)) / 1024);