From owner-p4-projects@FreeBSD.ORG Thu Mar 19 10:27:00 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C9DAE1065673; Thu, 19 Mar 2009 10:26:59 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B90B1065688 for ; Thu, 19 Mar 2009 10:26:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 48CE98FC13 for ; Thu, 19 Mar 2009 10:26:59 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n2JAQxkW034250 for ; Thu, 19 Mar 2009 10:26:59 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n2JAQxUr034248 for perforce@freebsd.org; Thu, 19 Mar 2009 10:26:59 GMT (envelope-from hselasky@FreeBSD.org) Date: Thu, 19 Mar 2009 10:26:59 GMT Message-Id: <200903191026.n2JAQxUr034248@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 159431 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2009 10:27:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=159431 Change 159431 by hselasky@hselasky_laptop001 on 2009/03/19 10:26:36 USB core + USB controller: - Remove a redundant zero subtraction. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#4 edit .. //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#8 edit .. //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#3 edit .. //depot/projects/usb/src/sys/dev/usb/controller/uhci.c#3 edit .. //depot/projects/usb/src/sys/dev/usb/controller/uss820dci.c#4 edit .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.h#3 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#4 (text+ko) ==== @@ -66,7 +66,7 @@ #define AT9100_DCI_BUS2SC(bus) \ ((struct at91dci_softc *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((struct at91dci_softc *)0)->sc_bus)))) + ((uint8_t *)&(((struct at91dci_softc *)0)->sc_bus)))) #define AT9100_DCI_PC2SC(pc) \ AT9100_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) ==== //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#8 (text+ko) ==== @@ -59,7 +59,7 @@ #define ATMEGA_BUS2SC(bus) \ ((struct atmegadci_softc *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((struct atmegadci_softc *)0)->sc_bus)))) + ((uint8_t *)&(((struct atmegadci_softc *)0)->sc_bus)))) #define ATMEGA_PC2SC(pc) \ ATMEGA_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) ==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#6 (text+ko) ==== @@ -66,8 +66,9 @@ #include #include -#define EHCI_BUS2SC(bus) ((ehci_softc_t *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((ehci_softc_t *)0)->sc_bus)))) +#define EHCI_BUS2SC(bus) \ + ((ehci_softc_t *)(((uint8_t *)(bus)) - \ + ((uint8_t *)&(((ehci_softc_t *)0)->sc_bus)))) #if USB_DEBUG static int ehcidebug = 0; ==== //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#3 (text+ko) ==== @@ -55,8 +55,9 @@ #include #include -#define OHCI_BUS2SC(bus) ((ohci_softc_t *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((ohci_softc_t *)0)->sc_bus)))) +#define OHCI_BUS2SC(bus) \ + ((ohci_softc_t *)(((uint8_t *)(bus)) - \ + ((uint8_t *)&(((ohci_softc_t *)0)->sc_bus)))) #if USB_DEBUG static int ohcidebug = 0; ==== //depot/projects/usb/src/sys/dev/usb/controller/uhci.c#3 (text+ko) ==== @@ -59,8 +59,9 @@ #include #define alt_next next -#define UHCI_BUS2SC(bus) ((uhci_softc_t *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((uhci_softc_t *)0)->sc_bus)))) +#define UHCI_BUS2SC(bus) \ + ((uhci_softc_t *)(((uint8_t *)(bus)) - \ + ((uint8_t *)&(((uhci_softc_t *)0)->sc_bus)))) #if USB_DEBUG static int uhcidebug = 0; ==== //depot/projects/usb/src/sys/dev/usb/controller/uss820dci.c#4 (text+ko) ==== @@ -55,7 +55,7 @@ #define USS820_DCI_BUS2SC(bus) \ ((struct uss820dci_softc *)(((uint8_t *)(bus)) - \ - USB_P2U(&(((struct uss820dci_softc *)0)->sc_bus)))) + ((uint8_t *)&(((struct uss820dci_softc *)0)->sc_bus)))) #define USS820_DCI_PC2SC(pc) \ USS820_DCI_BUS2SC(USB_DMATAG_TO_XROOT((pc)->tag_parent)->bus) ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.h#3 (text+ko) ==== @@ -39,8 +39,7 @@ #define USB_DMATAG_TO_XROOT(dpt) \ ((struct usb2_xfer_root *)( \ ((uint8_t *)(dpt)) - \ - ((uint8_t *)&((struct usb2_xfer_root *)0)->dma_parent_tag) + \ - ((uint8_t *)0))) + ((uint8_t *)&((struct usb2_xfer_root *)0)->dma_parent_tag))) /* * The following structure is used to keep information about memory