Date: Thu, 19 Mar 2009 10:26:59 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 159431 for review Message-ID: <200903191026.n2JAQxUr034248@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <dev/usb/usb_bus.h> #include <dev/usb/controller/ehci.h> -#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 <dev/usb/usb_bus.h> #include <dev/usb/controller/ohci.h> -#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 <dev/usb/controller/uhci.h> #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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903191026.n2JAQxUr034248>