Commit c50a00f8 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Sarah Sharp

USB: xhci: fix couple sparse annotations

There is no point in casting to (void *) when setting up xhci->ir_set
as it only makes us lose __iomem annotation and makes sparse unhappy.

OTOH we do need to cast to (void *) when calculating xhci->dba from
offset, but since it is IO memory we need to annotate it as such.
Signed-off-by: default avatarDmitry Torokhov <dtor@vmware.com>
Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
parent 09ece30e
...@@ -1900,11 +1900,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) ...@@ -1900,11 +1900,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
val &= DBOFF_MASK; val &= DBOFF_MASK;
xhci_dbg(xhci, "// Doorbell array is located at offset 0x%x" xhci_dbg(xhci, "// Doorbell array is located at offset 0x%x"
" from cap regs base addr\n", val); " from cap regs base addr\n", val);
xhci->dba = (void *) xhci->cap_regs + val; xhci->dba = (void __iomem *) xhci->cap_regs + val;
xhci_dbg_regs(xhci); xhci_dbg_regs(xhci);
xhci_print_run_regs(xhci); xhci_print_run_regs(xhci);
/* Set ir_set to interrupt register set 0 */ /* Set ir_set to interrupt register set 0 */
xhci->ir_set = (void *) xhci->run_regs->ir_set; xhci->ir_set = &xhci->run_regs->ir_set[0];
/* /*
* Event ring setup: Allocate a normal ring, but also setup * Event ring setup: Allocate a normal ring, but also setup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment