forked from luck/tmp_suning_uos_patched
USB: xhci: rework xhci_print_ir_set() to get ir set from xhci itself
xhci->ir_set points to __iomem region, but xhci_print_ir_set accepts plain struct xhci_intr_reg * causing multiple sparse warning at call sites and inside the fucntion when we try to read that memory. Instead of adding __iomem qualifier to the argument let's rework the function so it itself gets needed register set from xhci and prints it. Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
parent
07194ab7be
commit
09ece30e06
@ -169,9 +169,10 @@ static void xhci_print_ports(struct xhci_hcd *xhci)
|
||||
}
|
||||
}
|
||||
|
||||
void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int set_num)
|
||||
void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num)
|
||||
{
|
||||
void *addr;
|
||||
struct xhci_intr_reg __iomem *ir_set = &xhci->run_regs->ir_set[set_num];
|
||||
void __iomem *addr;
|
||||
u32 temp;
|
||||
u64 temp_64;
|
||||
|
||||
|
@ -1961,7 +1961,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
|
||||
/* Set the event ring dequeue address */
|
||||
xhci_set_hc_event_deq(xhci);
|
||||
xhci_dbg(xhci, "Wrote ERST address to ir_set 0.\n");
|
||||
xhci_print_ir_set(xhci, xhci->ir_set, 0);
|
||||
xhci_print_ir_set(xhci, 0);
|
||||
|
||||
/*
|
||||
* XXX: Might need to set the Interrupter Moderation Register to
|
||||
|
@ -473,7 +473,7 @@ int xhci_run(struct usb_hcd *hcd)
|
||||
xhci->ir_set, (unsigned int) ER_IRQ_ENABLE(temp));
|
||||
xhci_writel(xhci, ER_IRQ_ENABLE(temp),
|
||||
&xhci->ir_set->irq_pending);
|
||||
xhci_print_ir_set(xhci, xhci->ir_set, 0);
|
||||
xhci_print_ir_set(xhci, 0);
|
||||
|
||||
if (NUM_TEST_NOOPS > 0)
|
||||
doorbell = xhci_setup_one_noop(xhci);
|
||||
@ -528,7 +528,7 @@ void xhci_stop(struct usb_hcd *hcd)
|
||||
temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
||||
xhci_writel(xhci, ER_IRQ_DISABLE(temp),
|
||||
&xhci->ir_set->irq_pending);
|
||||
xhci_print_ir_set(xhci, xhci->ir_set, 0);
|
||||
xhci_print_ir_set(xhci, 0);
|
||||
|
||||
xhci_dbg(xhci, "cleaning up memory\n");
|
||||
xhci_mem_cleanup(xhci);
|
||||
@ -755,7 +755,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
|
||||
temp = xhci_readl(xhci, &xhci->ir_set->irq_pending);
|
||||
xhci_writel(xhci, ER_IRQ_DISABLE(temp),
|
||||
&xhci->ir_set->irq_pending);
|
||||
xhci_print_ir_set(xhci, xhci->ir_set, 0);
|
||||
xhci_print_ir_set(xhci, 0);
|
||||
|
||||
xhci_dbg(xhci, "cleaning up memory\n");
|
||||
xhci_mem_cleanup(xhci);
|
||||
|
@ -1348,7 +1348,7 @@ static inline int xhci_link_trb_quirk(struct xhci_hcd *xhci)
|
||||
}
|
||||
|
||||
/* xHCI debugging */
|
||||
void xhci_print_ir_set(struct xhci_hcd *xhci, struct xhci_intr_reg *ir_set, int set_num);
|
||||
void xhci_print_ir_set(struct xhci_hcd *xhci, int set_num);
|
||||
void xhci_print_registers(struct xhci_hcd *xhci);
|
||||
void xhci_dbg_regs(struct xhci_hcd *xhci);
|
||||
void xhci_print_run_regs(struct xhci_hcd *xhci);
|
||||
|
Loading…
Reference in New Issue
Block a user