Re: [PATCH 2/2] USB: xhci - fix couple sparse annotations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dmitry,

In your opinion, do these two patches need to be queued for stable?
Will this actually cause a crash/odd behavior for a user?

I would just queue this for stable, but the first patch changes the call
signature of a global xHCI function.  We don't really want to do that
for stable kernels.  If you are convinced it will cause crashes for
users, then I'll respin it for stable without the API change.

Sarah Sharp

On Fri, Feb 11, 2011 at 03:28:12PM -0800, Sarah Sharp wrote:
> These two also look fine, but I'd like to test.
> 
> Sarah Sharp
> 
> On Tue, Feb 08, 2011 at 04:29:34PM -0800, Dmitry Torokhov wrote:
> > 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: Dmitry Torokhov <dtor@xxxxxxxxxx>
> > ---
> >  drivers/usb/host/xhci-mem.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
> > index f2a34e6..a953439 100644
> > --- a/drivers/usb/host/xhci-mem.c
> > +++ b/drivers/usb/host/xhci-mem.c
> > @@ -1900,11 +1900,11 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
> >  	val &= DBOFF_MASK;
> >  	xhci_dbg(xhci, "// Doorbell array is located at offset 0x%x"
> >  			" 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_print_run_regs(xhci);
> >  	/* 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
> > -- 
> > 1.7.3.2
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux