On Sat, 11 Jul 2009 06:10:18 +0800 Greg KH <greg@xxxxxxxxx> wrote: > On Fri, Jun 26, 2009 at 04:57:17PM +0800, Alek Du wrote: > > From 0d1f9abf7239d24233329fcd0eedb973f69538dc Mon Sep 17 00:00:00 > > 2001 From: Alek Du <alek.du@xxxxxxxxx> > > Date: Fri, 26 Jun 2009 16:03:41 +0800 > > Subject: [PATCH] EHCI: split ehci_qh - ehci-mem.c and ehci-hcd.c > > changes > > > > The ehci_qh allocation and free changed. > > Also the dma pool item size changed. > > The ehci_qh items in ehci_hcd initialization changed. > > > > Signed-off-by: Alek Du <alek.du@xxxxxxxxx> > > --- > > drivers/usb/host/ehci-hcd.c | 15 ++++++++------- > > drivers/usb/host/ehci-mem.c | 26 +++++++++++++++++--------- > > 2 files changed, 25 insertions(+), 16 deletions(-) > > > > diff --git a/drivers/usb/host/ehci-hcd.c > > b/drivers/usb/host/ehci-hcd.c index 2b72473..b1b19da 100644 > > --- a/drivers/usb/host/ehci-hcd.c > > +++ b/drivers/usb/host/ehci-hcd.c > > @@ -544,12 +544,13 @@ static int ehci_init(struct usb_hcd *hcd) > > * from automatically advancing to the next td after short > > reads. */ > > ehci->async->qh_next.qh = NULL; > > - ehci->async->hw_next = QH_NEXT(ehci, ehci->async->qh_dma); > > - ehci->async->hw_info1 = cpu_to_hc32(ehci, QH_HEAD); > > - ehci->async->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); > > - ehci->async->hw_qtd_next = EHCI_LIST_END(ehci); > > + HW(ehci->async)->hw_next = QH_NEXT(ehci, > > ehci->async->qh_dma); > > Ick, that's just ugly :( > > Just spell out the whole long pointer chain, or even better yet, > assign it to a temporary variable and use it instead. That would > make the generated code smaller and faster. > Ok, that makes sense! > thanks, > > greg k-h -- 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