svn commit: r213392 - in user/weongyo/usb/sys/dev/usb: . controller input misc net quirk serial storage template

Weongyo Jeong weongyo at FreeBSD.org
Sun Oct 3 23:40:54 UTC 2010


Author: weongyo
Date: Sun Oct  3 23:40:54 2010
New Revision: 213392
URL: http://svn.freebsd.org/changeset/base/213392

Log:
  Removes unnecessary parentheses.

Modified:
  user/weongyo/usb/sys/dev/usb/controller/at91dci.c
  user/weongyo/usb/sys/dev/usb/controller/atmegadci.c
  user/weongyo/usb/sys/dev/usb/controller/avr32dci.c
  user/weongyo/usb/sys/dev/usb/controller/ehci.c
  user/weongyo/usb/sys/dev/usb/controller/ehci_pci.c
  user/weongyo/usb/sys/dev/usb/controller/musb_otg.c
  user/weongyo/usb/sys/dev/usb/controller/ohci.c
  user/weongyo/usb/sys/dev/usb/controller/ohci_pci.c
  user/weongyo/usb/sys/dev/usb/controller/uhci.c
  user/weongyo/usb/sys/dev/usb/controller/uhci_pci.c
  user/weongyo/usb/sys/dev/usb/controller/usb_controller.c
  user/weongyo/usb/sys/dev/usb/controller/uss820dci.c
  user/weongyo/usb/sys/dev/usb/input/atp.c
  user/weongyo/usb/sys/dev/usb/input/uep.c
  user/weongyo/usb/sys/dev/usb/input/uhid.c
  user/weongyo/usb/sys/dev/usb/input/ukbd.c
  user/weongyo/usb/sys/dev/usb/input/ums.c
  user/weongyo/usb/sys/dev/usb/misc/udbp.c
  user/weongyo/usb/sys/dev/usb/misc/ufm.c
  user/weongyo/usb/sys/dev/usb/net/if_cdce.c
  user/weongyo/usb/sys/dev/usb/quirk/usb_quirk.c
  user/weongyo/usb/sys/dev/usb/serial/uark.c
  user/weongyo/usb/sys/dev/usb/serial/ubser.c
  user/weongyo/usb/sys/dev/usb/serial/ucycom.c
  user/weongyo/usb/sys/dev/usb/serial/ufoma.c
  user/weongyo/usb/sys/dev/usb/serial/uftdi.c
  user/weongyo/usb/sys/dev/usb/serial/ulpt.c
  user/weongyo/usb/sys/dev/usb/serial/umodem.c
  user/weongyo/usb/sys/dev/usb/serial/umoscom.c
  user/weongyo/usb/sys/dev/usb/serial/usb_serial.c
  user/weongyo/usb/sys/dev/usb/storage/umass.c
  user/weongyo/usb/sys/dev/usb/storage/urio.c
  user/weongyo/usb/sys/dev/usb/storage/ustorage_fs.c
  user/weongyo/usb/sys/dev/usb/template/usb_template.c
  user/weongyo/usb/sys/dev/usb/template/usb_template_mtp.c
  user/weongyo/usb/sys/dev/usb/usb_busdma.c
  user/weongyo/usb/sys/dev/usb/usb_compat_linux.c
  user/weongyo/usb/sys/dev/usb/usb_dev.c
  user/weongyo/usb/sys/dev/usb/usb_device.c
  user/weongyo/usb/sys/dev/usb/usb_generic.c
  user/weongyo/usb/sys/dev/usb/usb_handle_request.c
  user/weongyo/usb/sys/dev/usb/usb_hid.c
  user/weongyo/usb/sys/dev/usb/usb_hub.c
  user/weongyo/usb/sys/dev/usb/usb_lookup.c
  user/weongyo/usb/sys/dev/usb/usb_parse.c
  user/weongyo/usb/sys/dev/usb/usb_request.c
  user/weongyo/usb/sys/dev/usb/usb_transfer.c
  user/weongyo/usb/sys/dev/usb/usb_util.c

Modified: user/weongyo/usb/sys/dev/usb/controller/at91dci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/at91dci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/at91dci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -344,8 +344,8 @@ at91dci_setup_rx(struct at91dci_td *td)
 	sc = AT9100_DCI_PC2SC(td->pc);
 
 	/* sneak peek the set address */
-	if ((req.bmRequestType == UT_WRITE_DEVICE) &&
-	    (req.bRequest == UR_SET_ADDRESS))
+	if (req.bmRequestType == UT_WRITE_DEVICE &&
+	    req.bRequest == UR_SET_ADDRESS)
 		sc->sc_dv_addr = req.wValue[0] & 0x7F;
 	else
 		sc->sc_dv_addr = 0xFF;
@@ -492,7 +492,7 @@ repeat:
 	 */
 
 	/* check if we are complete */
-	if ((td->remainder == 0) || got_short) {
+	if (td->remainder == 0 || got_short) {
 		if (td->short_pkt) {
 			/* we are complete */
 			return (0);
@@ -1568,8 +1568,8 @@ at91dci_device_isoc_fs_enter(struct usb_
 	 */
 	temp = (nframes - xfer->endpoint->isoc_next) & AT91_UDP_FRM_MASK;
 
-	if ((xfer->endpoint->is_synced == 0) ||
-	    (temp < xfer->nframes)) {
+	if (xfer->endpoint->is_synced == 0 ||
+	    temp < xfer->nframes) {
 		/*
 		 * If there is data underflow or the endpoint queue is
 		 * empty we schedule the transfer a few frames ahead

Modified: user/weongyo/usb/sys/dev/usb/controller/atmegadci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/atmegadci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/atmegadci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -289,8 +289,8 @@ atmegadci_setup_rx(struct atmegadci_td *
 	td->remainder = 0;
 
 	/* sneak peek the set address */
-	if ((req.bmRequestType == UT_WRITE_DEVICE) &&
-	    (req.bRequest == UR_SET_ADDRESS)) {
+	if (req.bmRequestType == UT_WRITE_DEVICE &&
+	    req.bRequest == UR_SET_ADDRESS) {
 		sc->sc_dv_addr = req.wValue[0] & 0x7F;
 		/* must write address before ZLP */
 		ATMEGA_WRITE_1(sc, ATMEGA_UDADDR, sc->sc_dv_addr);
@@ -415,7 +415,7 @@ repeat:
 	ATMEGA_WRITE_1(sc, ATMEGA_UEINTX, ATMEGA_UEINTX_FIFOCON ^ 0xFF);
 
 	/* check if we are complete */
-	if ((td->remainder == 0) || got_short) {
+	if (td->remainder == 0 || got_short) {
 		if (td->short_pkt) {
 			/* we are complete */
 			return (0);
@@ -1415,8 +1415,8 @@ atmegadci_device_isoc_fs_enter(struct us
 	 */
 	temp = (nframes - xfer->endpoint->isoc_next) & ATMEGA_FRAME_MASK;
 
-	if ((xfer->endpoint->is_synced == 0) ||
-	    (temp < xfer->nframes)) {
+	if (xfer->endpoint->is_synced == 0 ||
+	    temp < xfer->nframes) {
 		/*
 		 * If there is data underflow or the pipe queue is
 		 * empty we schedule the transfer a few frames ahead

Modified: user/weongyo/usb/sys/dev/usb/controller/avr32dci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/avr32dci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/avr32dci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -313,8 +313,8 @@ avr32dci_setup_rx(struct avr32dci_td *td
 	td->remainder = 0;
 
 	/* sneak peek the set address */
-	if ((req.bmRequestType == UT_WRITE_DEVICE) &&
-	    (req.bRequest == UR_SET_ADDRESS)) {
+	if (req.bmRequestType == UT_WRITE_DEVICE &&
+	    req.bRequest == UR_SET_ADDRESS) {
 		sc->sc_dv_addr = req.wValue[0] & 0x7F;
 		/* must write address before ZLP */
 		avr32dci_mod_ctrl(sc, 0, AVR32_CTRL_DEV_FADDR_EN |
@@ -427,7 +427,7 @@ repeat:
 	AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(td->ep_no), AVR32_EPTSTA_RX_BK_RDY);
 
 	/* check if we are complete */
-	if ((td->remainder == 0) || got_short) {
+	if (td->remainder == 0 || got_short) {
 		if (td->short_pkt) {
 			/* we are complete */
 			return (0);
@@ -1348,8 +1348,8 @@ avr32dci_device_isoc_fs_enter(struct usb
 	 */
 	temp = (nframes - xfer->pipe->isoc_next) & AVR32_FRAME_MASK;
 
-	if ((xfer->pipe->is_synced == 0) ||
-	    (temp < xfer->nframes)) {
+	if (xfer->pipe->is_synced == 0 ||
+	    temp < xfer->nframes) {
 		/*
 		 * If there is data underflow or the pipe queue is
 		 * empty we schedule the transfer a few frames ahead
@@ -1989,8 +1989,8 @@ avr32dci_ep_init(struct usb_device *udev
 			/* not supported */
 			return;
 		}
-		if ((udev->speed != USB_SPEED_FULL) &&
-		    (udev->speed != USB_SPEED_HIGH)) {
+		if (udev->speed != USB_SPEED_FULL &&
+		    udev->speed != USB_SPEED_HIGH) {
 			/* not supported */
 			return;
 		}

Modified: user/weongyo/usb/sys/dev/usb/controller/ehci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/ehci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/ehci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -549,8 +549,8 @@ ehci_suspend(ehci_softc_t *sc)
 
 	for (i = 1; i <= sc->sc_noport; i++) {
 		cmd = EOREAD4(sc, EHCI_PORTSC(i));
-		if (((cmd & EHCI_PS_PO) == 0) &&
-		    ((cmd & EHCI_PS_PE) == EHCI_PS_PE)) {
+		if ((cmd & EHCI_PS_PO) == 0 &&
+		    (cmd & EHCI_PS_PE) == EHCI_PS_PE) {
 			EOWRITE4(sc, EHCI_PORTSC(i),
 			    cmd | EHCI_PS_SUSP);
 		}
@@ -613,8 +613,8 @@ ehci_resume(ehci_softc_t *sc)
 	hcr = 0;
 	for (i = 1; i <= sc->sc_noport; i++) {
 		cmd = EOREAD4(sc, EHCI_PORTSC(i));
-		if (((cmd & EHCI_PS_PO) == 0) &&
-		    ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) {
+		if ((cmd & EHCI_PS_PO) == 0 &&
+		    (cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP) {
 			EOWRITE4(sc, EHCI_PORTSC(i),
 			    cmd | EHCI_PS_FPR);
 			hcr = 1;
@@ -627,8 +627,8 @@ ehci_resume(ehci_softc_t *sc)
 
 		for (i = 1; i <= sc->sc_noport; i++) {
 			cmd = EOREAD4(sc, EHCI_PORTSC(i));
-			if (((cmd & EHCI_PS_PO) == 0) &&
-			    ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) {
+			if ((cmd & EHCI_PS_PO) == 0 &&
+			    (cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP) {
 				EOWRITE4(sc, EHCI_PORTSC(i),
 				    cmd & ~EHCI_PS_FPR);
 			}
@@ -2120,7 +2120,7 @@ ehci_isoc_hs_done(ehci_softc_t *sc, stru
 
 		td_no++;
 
-		if ((td_no == 8) || (nframes == 0)) {
+		if (td_no == 8 || nframes == 0) {
 			/* remove HS-TD from schedule */
 			EHCI_REMOVE_HS_TD(td, *pp_last);
 			pp_last++;
@@ -2146,8 +2146,8 @@ ehci_device_done(struct usb_xfer *xfer, 
 	DPRINTFN(2, "xfer=%p, endpoint=%p, error=%d\n",
 	    xfer, xfer->endpoint, error);
 
-	if ((methods == &ehci_device_bulk_methods) ||
-	    (methods == &ehci_device_ctrl_methods)) {
+	if (methods == &ehci_device_bulk_methods ||
+	    methods == &ehci_device_ctrl_methods) {
 #ifdef USB_DEBUG
 		if (ehcidebug > 8) {
 			DPRINTF("nexttog=%d; data after transfer:\n",
@@ -2443,8 +2443,8 @@ ehci_device_isoc_fs_enter(struct usb_xfe
 	buf_offset = (nframes - xfer->endpoint->isoc_next) &
 	    (EHCI_VIRTUAL_FRAMELIST_COUNT - 1);
 
-	if ((xfer->endpoint->is_synced == 0) ||
-	    (buf_offset < xfer->nframes)) {
+	if (xfer->endpoint->is_synced == 0 ||
+	    buf_offset < xfer->nframes) {
 		/*
 		 * If there is data underflow or the pipe queue is empty we
 		 * schedule the transfer a few frames ahead of the current
@@ -2725,8 +2725,8 @@ ehci_device_isoc_hs_enter(struct usb_xfe
 	buf_offset = (nframes - xfer->endpoint->isoc_next) &
 	    (EHCI_VIRTUAL_FRAMELIST_COUNT - 1);
 
-	if ((xfer->endpoint->is_synced == 0) ||
-	    (buf_offset < (((xfer->nframes << shift) + 7) / 8))) {
+	if (xfer->endpoint->is_synced == 0 ||
+	    buf_offset < (((xfer->nframes << shift) + 7) / 8)) {
 		/*
 		 * If there is data underflow or the pipe queue is empty we
 		 * schedule the transfer a few frames ahead of the current
@@ -2808,7 +2808,7 @@ ehci_device_isoc_hs_enter(struct usb_xfe
 
 		td_no++;
 
-		if ((td_no == 8) || (nframes == 0)) {
+		if (td_no == 8 || nframes == 0) {
 			/* the rest of the transfers are not active, if any */
 			for (x = td_no; x != 8; x++)
 				td->itd_status[x] = 0;	/* not active */
@@ -3135,8 +3135,7 @@ ehci_roothub_exec(struct usb_device *ude
 	case C(UR_CLEAR_FEATURE, UT_WRITE_CLASS_OTHER):
 		DPRINTFN(9, "UR_CLEAR_PORT_FEATURE\n");
 
-		if ((index < 1) ||
-		    (index > sc->sc_noport)) {
+		if (index < 1 || index > sc->sc_noport) {
 			err = USB_ERR_IOERROR;
 			goto done;
 		}
@@ -3225,8 +3224,7 @@ ehci_roothub_exec(struct usb_device *ude
 	case C(UR_GET_STATUS, UT_READ_CLASS_OTHER):
 		DPRINTFN(9, "get port status i=%d\n",
 		    index);
-		if ((index < 1) ||
-		    (index > sc->sc_noport)) {
+		if (index < 1 || index > sc->sc_noport) {
 			err = USB_ERR_IOERROR;
 			goto done;
 		}
@@ -3274,8 +3272,7 @@ ehci_roothub_exec(struct usb_device *ude
 	case C(UR_SET_FEATURE, UT_WRITE_CLASS_DEVICE):
 		break;
 	case C(UR_SET_FEATURE, UT_WRITE_CLASS_OTHER):
-		if ((index < 1) ||
-		    (index > sc->sc_noport)) {
+		if (index < 1 || index > sc->sc_noport) {
 			err = USB_ERR_IOERROR;
 			goto done;
 		}
@@ -3639,11 +3636,11 @@ ehci_ep_init(struct usb_device *udev, st
 		return;
 	}
 	if (udev->device_index != sc->sc_addr) {
-		if ((udev->speed != USB_SPEED_HIGH) &&
-		    ((udev->hs_hub_addr == 0) ||
-		    (udev->hs_port_no == 0) ||
-		    (udev->parent_hs_hub == NULL) ||
-		    (udev->parent_hs_hub->hub == NULL))) {
+		if (udev->speed != USB_SPEED_HIGH &&
+		    (udev->hs_hub_addr == 0 ||
+		     udev->hs_port_no == 0 ||
+		     udev->parent_hs_hub == NULL ||
+		     udev->parent_hs_hub->hub == NULL)) {
 			/* We need a transaction translator */
 			goto done;
 		}
@@ -3698,8 +3695,8 @@ ehci_device_resume(struct usb_device *ud
 		if (xfer->xroot->udev == udev) {
 			methods = xfer->endpoint->methods;
 
-			if ((methods == &ehci_device_bulk_methods) ||
-			    (methods == &ehci_device_ctrl_methods)) {
+			if (methods == &ehci_device_bulk_methods ||
+			    methods == &ehci_device_ctrl_methods) {
 				EHCI_APPEND_QH(xfer->qh_start[xfer->curr_dma_set],
 				    sc->sc_async_p_last);
 			}
@@ -3730,8 +3727,8 @@ ehci_device_suspend(struct usb_device *u
 		if (xfer->xroot->udev == udev) {
 			methods = xfer->endpoint->methods;
 
-			if ((methods == &ehci_device_bulk_methods) ||
-			    (methods == &ehci_device_ctrl_methods)) {
+			if (methods == &ehci_device_bulk_methods ||
+			    methods == &ehci_device_ctrl_methods) {
 				EHCI_REMOVE_QH(xfer->qh_start[xfer->curr_dma_set],
 				    sc->sc_async_p_last);
 			}

Modified: user/weongyo/usb/sys/dev/usb/controller/ehci_pci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/ehci_pci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/ehci_pci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -228,9 +228,9 @@ ehci_pci_match(device_t self)
 		break;
 	}
 
-	if ((pci_get_class(self) == PCIC_SERIALBUS)
-	    && (pci_get_subclass(self) == PCIS_SERIALBUS_USB)
-	    && (pci_get_progif(self) == PCI_INTERFACE_EHCI))
+	if (pci_get_class(self) == PCIC_SERIALBUS &&
+	    pci_get_subclass(self) == PCIS_SERIALBUS_USB &&
+	    pci_get_progif(self) == PCI_INTERFACE_EHCI)
 		return ("EHCI (generic) USB 2.0 controller");
 	return (NULL);			/* dunno */
 }
@@ -280,8 +280,8 @@ ehci_pci_via_quirk(device_t self)
 {
 	uint32_t val;
 
-	if ((pci_get_device(self) == 0x3104) && 
-	    ((pci_get_revid(self) & 0xf0) == 0x60)) {
+	if (pci_get_device(self) == 0x3104 && 
+	    (pci_get_revid(self) & 0xf0) == 0x60) {
 		/* Correct schedule sleep time to 10us */
 		val = pci_read_config(self, 0x4b, 1);
 		if (val & 0x20)

Modified: user/weongyo/usb/sys/dev/usb/controller/musb_otg.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/musb_otg.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/musb_otg.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -321,8 +321,8 @@ musbotg_setup_rx(struct musbotg_td *td)
 	sc->sc_ep0_busy = 1;
 
 	/* sneak peek the set address */
-	if ((req.bmRequestType == UT_WRITE_DEVICE) &&
-	    (req.bRequest == UR_SET_ADDRESS))
+	if (req.bmRequestType == UT_WRITE_DEVICE &&
+	    req.bRequest == UR_SET_ADDRESS)
 		sc->sc_dv_addr = req.wValue[0] & 0x7F;
 	else
 		sc->sc_dv_addr = 0xFF;
@@ -465,7 +465,7 @@ musbotg_setup_data_rx(struct musbotg_td 
 	}
 
 	/* check if we are complete */
-	if ((td->remainder == 0) || got_short) {
+	if (td->remainder == 0 || got_short) {
 		if (td->short_pkt) {
 			/* we are complete */
 			sc->sc_ep0_cmd = MUSB2_MASK_CSR0L_RXPKTRDY_CLR;
@@ -749,7 +749,7 @@ repeat:
 	MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRL, 0);
 
 	/* check if we are complete */
-	if ((td->remainder == 0) || got_short) {
+	if (td->remainder == 0 || got_short) {
 		if (td->short_pkt) {
 			/* we are complete */
 			return (0);
@@ -2023,8 +2023,7 @@ musbotg_device_isoc_enter(struct usb_xfe
 	else
 		fs_frames = xfer->nframes;
 
-	if ((xfer->endpoint->is_synced == 0) ||
-	    (temp < fs_frames)) {
+	if (xfer->endpoint->is_synced == 0 || temp < fs_frames) {
 		/*
 		 * If there is data underflow or the pipe queue is
 		 * empty we schedule the transfer a few frames ahead
@@ -2554,8 +2553,8 @@ musbotg_xfer_setup(struct usb_setup_para
 	parm->hc_max_packet_size = 0x400;
 	parm->hc_max_frame_size = 0x400;
 
-	if ((parm->methods == &musbotg_device_isoc_methods) ||
-	    (parm->methods == &musbotg_device_intr_methods))
+	if (parm->methods == &musbotg_device_isoc_methods ||
+	    parm->methods == &musbotg_device_intr_methods)
 		parm->hc_max_packet_count = 3;
 	else
 		parm->hc_max_packet_count = 1;
@@ -2651,8 +2650,8 @@ musbotg_ep_init(struct usb_device *udev,
 			/* not supported */
 			return;
 		}
-		if ((udev->speed != USB_SPEED_FULL) &&
-		    (udev->speed != USB_SPEED_HIGH)) {
+		if (udev->speed != USB_SPEED_FULL &&
+		    udev->speed != USB_SPEED_HIGH) {
 			/* not supported */
 			return;
 		}

Modified: user/weongyo/usb/sys/dev/usb/controller/ohci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/ohci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/ohci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -987,7 +987,7 @@ ohci_check_transfer_sub(struct usb_xfer 
 	         * Check if we reached the last packet
 	         * or if there is a short packet:
 	         */
-		if (((td_next & (~0xF)) == OHCI_TD_NEXT_END) || phy_start) {
+		if ((td_next & (~0xF)) == OHCI_TD_NEXT_END || phy_start) {
 			/* follow alt next */
 			td = td->alt_next;
 			break;
@@ -1335,7 +1335,7 @@ restart:
 			temp->len -= average;
 		}
 
-		if ((td_next == td_alt_next) && temp->setup_alt_next) {
+		if (td_next == td_alt_next && temp->setup_alt_next) {
 			/* we need to receive these frames one by one ! */
 			td->td_flags &= htole32(~OHCI_TD_INTR_MASK);
 			td->td_flags |= htole32(OHCI_TD_SET_DI(1));

Modified: user/weongyo/usb/sys/dev/usb/controller/ohci_pci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/ohci_pci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/ohci_pci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -187,9 +187,9 @@ ohci_pci_match(device_t self)
 	default:
 		break;
 	}
-	if ((pci_get_class(self) == PCIC_SERIALBUS) &&
-	    (pci_get_subclass(self) == PCIS_SERIALBUS_USB) &&
-	    (pci_get_progif(self) == PCI_INTERFACE_OHCI))
+	if (pci_get_class(self) == PCIC_SERIALBUS &&
+	    pci_get_subclass(self) == PCIS_SERIALBUS_USB &&
+	    pci_get_progif(self) == PCI_INTERFACE_OHCI)
 		return ("OHCI (generic) USB controller");
 	return (NULL);
 }

Modified: user/weongyo/usb/sys/dev/usb/controller/uhci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/uhci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/uhci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -2853,9 +2853,9 @@ alloc_dma_set:
 			td = page_info.buffer;
 
 			/* init TD */
-			if ((parm->methods == &uhci_device_bulk_methods) ||
-			    (parm->methods == &uhci_device_ctrl_methods) ||
-			    (parm->methods == &uhci_device_intr_methods)) {
+			if (parm->methods == &uhci_device_bulk_methods ||
+			    parm->methods == &uhci_device_ctrl_methods ||
+			    parm->methods == &uhci_device_intr_methods) {
 				/* set depth first bit */
 				td->td_self = htole32(page_info.physaddr |
 				    UHCI_PTR_TD | UHCI_PTR_VF);

Modified: user/weongyo/usb/sys/dev/usb/controller/uhci_pci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/uhci_pci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/uhci_pci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -247,9 +247,9 @@ uhci_pci_match(device_t self)
 		break;
 	}
 
-	if ((pci_get_class(self) == PCIC_SERIALBUS) &&
-	    (pci_get_subclass(self) == PCIS_SERIALBUS_USB) &&
-	    (pci_get_progif(self) == PCI_INTERFACE_UHCI))
+	if (pci_get_class(self) == PCIC_SERIALBUS &&
+	    pci_get_subclass(self) == PCIS_SERIALBUS_USB &&
+	    pci_get_progif(self) == PCI_INTERFACE_UHCI)
 		return ("UHCI (generic) USB controller");
 	return (NULL);
 }

Modified: user/weongyo/usb/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/usb_controller.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/usb_controller.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -346,8 +346,8 @@ usb_bus_attach(void *arg, int npending)
 		err = usb_probe_and_attach(child,
 		    USB_IFACE_INDEX_ANY);
 		if (!err) {
-			if ((bus->devices[USB_ROOT_HUB_ADDR] == NULL) ||
-			    (bus->devices[USB_ROOT_HUB_ADDR]->hub == NULL))
+			if (bus->devices[USB_ROOT_HUB_ADDR] == NULL ||
+			    bus->devices[USB_ROOT_HUB_ADDR]->hub == NULL)
 				err = USB_ERR_NO_ROOT_HUB;
 		}
 	} else

Modified: user/weongyo/usb/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/controller/uss820dci.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/controller/uss820dci.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -321,8 +321,8 @@ uss820dci_setup_rx(struct uss820dci_td *
 	td->remainder = 0;
 
 	/* sneak peek the set address */
-	if ((req.bmRequestType == UT_WRITE_DEVICE) &&
-	    (req.bRequest == UR_SET_ADDRESS))
+	if (req.bmRequestType == UT_WRITE_DEVICE &&
+	    req.bRequest == UR_SET_ADDRESS)
 		sc->sc_dv_addr = req.wValue[0] & 0x7F;
 	else
 		sc->sc_dv_addr = 0xFF;
@@ -485,7 +485,7 @@ repeat:
 	    USS820_RXCON, rx_cntl);
 
 	/* check if we are complete */
-	if ((td->remainder == 0) || got_short) {
+	if (td->remainder == 0 || got_short) {
 		if (td->short_pkt) {
 			/* we are complete */
 			return (0);
@@ -543,9 +543,8 @@ repeat:
 		if (tx_flag & USS820_TXFLG_TXFIF1)
 			return (1);	/* not complete */
 	}
-	if ((!td->support_multi_buffer) &&
-	    (tx_flag & (USS820_TXFLG_TXFIF0 |
-	    USS820_TXFLG_TXFIF1)))
+	if (!td->support_multi_buffer &&
+	    (tx_flag & (USS820_TXFLG_TXFIF0 | USS820_TXFLG_TXFIF1)))
 		return (1);		/* not complete */
 	count = td->max_packet_size;
 	if (td->remainder < count) {
@@ -1387,15 +1386,15 @@ uss820dci_init(struct uss820dci_softc *s
 				    USS820_TXCON_ATM);
 			}
 		} else {
-			if ((pf->max_in_frame_size <= 8) &&
-			    (sc->sc_flags.mcsr_feat)) {
+			if (pf->max_in_frame_size <= 8 &&
+			    sc->sc_flags.mcsr_feat) {
 				temp = (USS820_TXCON_FFSZ_8_512 |
 				    USS820_TXCON_ATM);
 			} else if (pf->max_in_frame_size <= 16) {
 				temp = (USS820_TXCON_FFSZ_16_64 |
 				    USS820_TXCON_ATM);
-			} else if ((pf->max_in_frame_size <= 32) &&
-			    (sc->sc_flags.mcsr_feat)) {
+			} else if (pf->max_in_frame_size <= 32 &&
+			    sc->sc_flags.mcsr_feat) {
 				temp = (USS820_TXCON_FFSZ_32_1024 |
 				    USS820_TXCON_ATM);
 			} else {	/* 64 bytes */
@@ -1623,8 +1622,8 @@ uss820dci_device_isoc_fs_enter(struct us
 	 */
 	temp = (nframes - xfer->endpoint->isoc_next) & USS820_SOFL_MASK;
 
-	if ((xfer->endpoint->is_synced == 0) ||
-	    (temp < xfer->nframes)) {
+	if (xfer->endpoint->is_synced == 0 ||
+	    temp < xfer->nframes) {
 		/*
 		 * If there is data underflow or the pipe queue is
 		 * empty we schedule the transfer a few frames ahead

Modified: user/weongyo/usb/sys/dev/usb/input/atp.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/input/atp.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/input/atp.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -486,7 +486,7 @@ atp_set_device_mode(device_t dev, interf
 	usb_device_request_t  req;
 	usb_error_t           err;
 
-	if ((mode != RAW_SENSOR_MODE) && (mode != HID_MODE))
+	if (mode != RAW_SENSOR_MODE && mode != HID_MODE)
 		return (ENXIO);
 
 	sc = device_get_softc(dev);
@@ -850,8 +850,8 @@ atp_detect_pspans(int *p, u_int num_sens
 	/* post-process the spans */
 	for (i = 0; i < num_spans; i++) {
 		/* filter away unwanted pressure spans */
-		if ((spans[i].cum < atp_pspan_min_cum_pressure) ||
-		    (spans[i].width > atp_pspan_max_width)) {
+		if (spans[i].cum < atp_pspan_min_cum_pressure ||
+		    spans[i].width > atp_pspan_max_width) {
 			if ((i + 1) < num_spans) {
 				memcpy(&spans[i], &spans[i + 1],
 				    (num_spans - i - 1) * sizeof(atp_pspan));
@@ -954,7 +954,7 @@ atp_match_strokes_against_pspans(struct 
 				stroke->components[axis].matched = TRUE;
 
 				/* Take care to repeat at the multi-span. */
-				if ((repeat_count > 0) && (j == repeat_index))
+				if (repeat_count > 0 && j == repeat_index)
 					repeat_count--;
 				else
 					pspans[j].matched = TRUE;
@@ -1049,7 +1049,7 @@ atp_update_strokes(struct atp_softc *sc,
 		if (pspans_x[i].matched == FALSE) break;
 	for (j = 0; j < n_ypspans; j++)
 		if (pspans_y[j].matched == FALSE) break;
-	if ((i < n_xpspans) && (j < n_ypspans)) {
+	if (i < n_xpspans && j < n_ypspans) {
 #ifdef USB_DEBUG
 		if (atp_debug >= ATP_LLEVEL_INFO) {
 			printf("unmatched pspans:");
@@ -1068,7 +1068,7 @@ atp_update_strokes(struct atp_softc *sc,
 			printf("\n");
 		}
 #endif /* USB_DEBUG */
-		if ((n_xpspans == 1) && (n_ypspans == 1))
+		if (n_xpspans == 1 && n_ypspans == 1)
 			/* The common case of a single pair of new pspans. */
 			atp_add_stroke(sc, &pspans_x[0], &pspans_y[0]);
 		else
@@ -1204,12 +1204,12 @@ atp_add_new_strokes(struct atp_softc *sc
 
 			/* Take care to repeat at the multi-pspan. */
 			if (repeat_count > 0) {
-				if ((repeat_axis == X) &&
-				    (repeat_index == i)) {
+				if (repeat_axis == X &&
+				    repeat_index == i) {
 					i--; /* counter loop increment */
 					repeat_count--;
-				} else if ((repeat_axis == Y) &&
-				    (repeat_index == j)) {
+				} else if (repeat_axis == Y &&
+				    repeat_index == j) {
 					j--; /* counter loop increment */
 					repeat_count--;
 				}
@@ -1269,8 +1269,8 @@ atp_advance_stroke_state(struct atp_soft
 
 		u_int i;
 		for (i = 0; i < sc->sc_n_strokes; i++) {
-			if ((&sc->sc_strokes[i] == stroke) ||
-			    (sc->sc_strokes[i].type != ATP_STROKE_TOUCH))
+			if (&sc->sc_strokes[i] == stroke ||
+			    sc->sc_strokes[i].type != ATP_STROKE_TOUCH)
 				continue;
 
 			if (timevalcmp(&sc->sc_strokes[i].ctime,
@@ -1312,8 +1312,8 @@ atp_convert_to_slide(struct atp_softc *s
 	stroke->type = ATP_STROKE_SLIDE;
 
 	/* Are we at the beginning of a double-click-n-drag? */
-	if ((sc->sc_n_strokes == 1) &&
-	    ((sc->sc_state & ATP_ZOMBIES_EXIST) == 0) &&
+	if (sc->sc_n_strokes == 1 &&
+	    (sc->sc_state & ATP_ZOMBIES_EXIST) == 0 &&
 	    timevalcmp(&stroke->ctime, &sc->sc_reap_time, >)) {
 		struct timeval delta;
 		struct timeval window = {
@@ -1343,8 +1343,8 @@ atp_terminate_stroke(struct atp_softc *s
 	if (s->flags & ATSF_ZOMBIE)
 		return;
 
-	if ((s->type == ATP_STROKE_TOUCH) &&
-	    (s->age > atp_stroke_maturity_threshold)) {
+	if (s->type == ATP_STROKE_TOUCH &&
+	    s->age > atp_stroke_maturity_threshold) {
 		s->flags |= ATSF_ZOMBIE;
 
 		/* If no zombies exist, then prepare to reap zombies later. */
@@ -1453,7 +1453,7 @@ atp_compute_smoothening_scale_ratio(atp_
 	vel_squared = dxdt * dxdt + dydt * dydt;
 	vel_squared_smooth = (3 * stroke->velocity_squared + vel_squared) >> 2;
 	stroke->velocity_squared = vel_squared_smooth; /* retained as history */
-	if ((vel_squared == 0) || (vel_squared_smooth == 0))
+	if (vel_squared == 0 || vel_squared_smooth == 0)
 		return; /* returning (numerator == 0) will imply zero movement*/
 
 	/*
@@ -1465,7 +1465,7 @@ atp_compute_smoothening_scale_ratio(atp_
 	 */
 
 	/* Keep within the bounds of the square-root table. */
-	while ((vel_squared > N) || (vel_squared_smooth > N)) {
+	while (vel_squared > N || vel_squared_smooth > N) {
 		/* Dividing uniformly by 2 won't disturb the final ratio. */
 		vel_squared        >>= 1;
 		vel_squared_smooth >>= 1;
@@ -1502,7 +1502,7 @@ atp_compute_stroke_movement(atp_stroke *
 
 	/* Get the scale ratio and smoothen movement. */
 	atp_compute_smoothening_scale_ratio(stroke, &num, &denom);
-	if ((num == 0) || (denom == 0)) {
+	if (num == 0 || denom == 0) {
 		stroke->components[X].movement = 0;
 		stroke->components[Y].movement = 0;
 		stroke->velocity_squared >>= 1; /* Erode velocity_squared. */
@@ -1630,8 +1630,8 @@ atp_probe(device_t self)
 	if (uaa->usb_mode != USB_MODE_HOST)
 		return (ENXIO);
 
-	if ((uaa->info.bInterfaceClass != UICLASS_HID) ||
-	    (uaa->info.bInterfaceProtocol != UIPROTO_MOUSE))
+	if (uaa->info.bInterfaceClass != UICLASS_HID ||
+	    uaa->info.bInterfaceProtocol != UIPROTO_MOUSE)
 		return (ENXIO);
 
 	return (usbd_lookup_id_by_uaa(atp_devs, sizeof(atp_devs), uaa));
@@ -1840,13 +1840,13 @@ atp_intr(struct usb_xfer *xfer, usb_erro
 			DPRINTFN(ATP_LLEVEL_INFO, "button %s\n",
 			    ((sc->sc_status.button & MOUSE_BUTTON1DOWN) ?
 				"pressed" : "released"));
-		} else if ((sc->sc_status.obutton == 0) &&
-		    (sc->sc_status.button == 0) &&
-		    (tap_fingers != 0)) {
+		} else if (sc->sc_status.obutton == 0 &&
+		    sc->sc_status.button == 0 &&
+		    tap_fingers != 0) {
 			/* Ignore single-finger taps at the edges. */
-			if ((tap_fingers == 1) &&
-			    ((reaped_xlocs[0] <= sc->sc_left_margin) ||
-				(reaped_xlocs[0] > sc->sc_right_margin)))
+			if (tap_fingers == 1 &&
+			    (reaped_xlocs[0] <= sc->sc_left_margin ||
+			     reaped_xlocs[0] > sc->sc_right_margin))
 				tap_fingers = 0;
 			DPRINTFN(ATP_LLEVEL_INFO,
 			    "tap_fingers: %u\n", tap_fingers);
@@ -1861,8 +1861,8 @@ atp_intr(struct usb_xfer *xfer, usb_erro
 			for (u_int i = 0; i < sc->sc_n_strokes; i++) {
 				atp_stroke *stroke = &sc->sc_strokes[i];
 
-				if ((stroke->components[X].movement) ||
-				    (stroke->components[Y].movement)) {
+				if (stroke->components[X].movement ||
+				    stroke->components[Y].movement) {
 					dx += stroke->components[X].movement;
 					dy += stroke->components[Y].movement;
 					n_movements++;
@@ -1901,9 +1901,9 @@ atp_intr(struct usb_xfer *xfer, usb_erro
 		 * remained idle beyond a threshold, we reinitialize
 		 * it to silence the interrupts.
 		 */
-		if ((sc->sc_status.flags  == 0) &&
-		    (sc->sc_n_strokes     == 0) &&
-		    (sc->sc_status.button == 0)) {
+		if (sc->sc_status.flags  == 0 &&
+		    sc->sc_n_strokes     == 0 &&
+		    sc->sc_status.button == 0) {
 			sc->sc_idlecount++;
 			if (sc->sc_idlecount >= ATP_IDLENESS_THRESHOLD) {
 				DPRINTFN(ATP_LLEVEL_INFO, "idle\n");
@@ -2008,7 +2008,7 @@ atp_start_read(struct usb_fifo *fifo)
 	if (rate > 1000)
 		rate = 1000;
 	/* Check for set rate */
-	if ((rate > 0) && (sc->sc_xfer[ATP_INTR_DT] != NULL)) {
+	if (rate > 0 && sc->sc_xfer[ATP_INTR_DT] != NULL) {
 		/* Stop current transfer, if any */
 		usbd_transfer_stop(sc->sc_xfer[ATP_INTR_DT]);
 		/* Set new interval */
@@ -2089,7 +2089,7 @@ atp_ioctl(struct usb_fifo *fifo, u_long 
 		if (mode.level == -1)
 			/* Don't change the current setting */
 			;
-		else if ((mode.level < 0) || (mode.level > 1)) {
+		else if (mode.level < 0 || mode.level > 1) {
 			error = EINVAL;
 			goto done;
 		}

Modified: user/weongyo/usb/sys/dev/usb/input/uep.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/input/uep.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/input/uep.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -296,13 +296,13 @@ uep_probe(device_t dev)
 	if (uaa->usb_mode != USB_MODE_HOST)
 		return (ENXIO);
 
-	if ((uaa->info.idVendor == USB_VENDOR_EGALAX) &&
-	    ((uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL) ||
-	    (uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL2)))
+	if (uaa->info.idVendor == USB_VENDOR_EGALAX &&
+	    (uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL ||
+	     uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL2))
 		return (BUS_PROBE_SPECIFIC);
 
-	if ((uaa->info.idVendor == USB_VENDOR_EGALAX2) &&
-	    (uaa->info.idProduct == USB_PRODUCT_EGALAX2_TPANEL))
+	if (uaa->info.idVendor == USB_VENDOR_EGALAX2 &&
+	    uaa->info.idProduct == USB_PRODUCT_EGALAX2_TPANEL)
 		return (BUS_PROBE_SPECIFIC);
 
 	return (ENXIO);

Modified: user/weongyo/usb/sys/dev/usb/input/uhid.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/input/uhid.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/input/uhid.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -171,8 +171,8 @@ uhid_intr_callback(struct usb_xfer *xfer
 		 * If the ID byte is non zero we allow descriptors
 		 * having multiple sizes:
 		 */
-		if ((actlen >= sc->sc_isize) ||
-		    ((actlen > 0) && (sc->sc_iid != 0))) {
+		if (actlen >= sc->sc_isize ||
+		    (actlen > 0 && sc->sc_iid != 0)) {
 			/* limit report length to the maximum */
 			if (actlen > sc->sc_isize)
 				actlen = sc->sc_isize;
@@ -594,9 +594,9 @@ uhid_probe(device_t dev)
 	}
 	if (uaa->info.bInterfaceClass != UICLASS_HID) {
 		/* the Xbox 360 gamepad doesn't use the HID class */
-		if ((uaa->info.bInterfaceClass != UICLASS_VENDOR) ||
-		    (uaa->info.bInterfaceSubClass != UISUBCLASS_XBOX360_CONTROLLER) ||
-		    (uaa->info.bInterfaceProtocol != UIPROTO_XBOX360_GAMEPAD))
+		if (uaa->info.bInterfaceClass != UICLASS_VENDOR ||
+		    uaa->info.bInterfaceSubClass != UISUBCLASS_XBOX360_CONTROLLER ||
+		    uaa->info.bInterfaceProtocol != UIPROTO_XBOX360_GAMEPAD)
 			return (ENXIO);
 	}
 	if (usb_test_quirk(uaa, UQ_HID_IGNORE))
@@ -656,9 +656,9 @@ uhid_attach(device_t dev)
 			sc->sc_repdesc_ptr = &uhid_graphire3_4x5_report_descr;
 			sc->sc_flags |= UHID_FLAG_STATIC_DESC;
 		}
-	} else if ((uaa->info.bInterfaceClass == UICLASS_VENDOR) &&
-		    (uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER) &&
-	    (uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD)) {
+	} else if (uaa->info.bInterfaceClass == UICLASS_VENDOR &&
+	    uaa->info.bInterfaceSubClass == UISUBCLASS_XBOX360_CONTROLLER &&
+	    uaa->info.bInterfaceProtocol == UIPROTO_XBOX360_GAMEPAD) {
 		/* the Xbox 360 gamepad has no report descriptor */
 		sc->sc_repdesc_size = sizeof(uhid_xb360gp_report_descr);
 		sc->sc_repdesc_ptr = &uhid_xb360gp_report_descr;

Modified: user/weongyo/usb/sys/dev/usb/input/ukbd.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/input/ukbd.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/input/ukbd.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -744,8 +744,8 @@ ukbd_probe(device_t dev)
 	if (uaa->info.bInterfaceClass != UICLASS_HID)
 		return (ENXIO);
 
-	if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) &&
-	    (uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD)) {
+	if (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT &&
+	    uaa->info.bInterfaceProtocol == UIPROTO_BOOT_KEYBOARD) {
 		if (usb_test_quirk(uaa, UQ_KBD_IGNORE))
 			return (ENXIO);
 		else
@@ -1140,8 +1140,7 @@ ukbd_check_char(keyboard_t *kbd)
 	if (ukbd_polls_other_thread(sc))
 		return (0);
 
-	if ((sc->sc_composed_char > 0) &&
-	    (!(sc->sc_flags & UKBD_FLAG_COMPOSE)))
+	if (sc->sc_composed_char > 0 && !(sc->sc_flags & UKBD_FLAG_COMPOSE))
 		return (1);
 	return (ukbd_check(kbd));
 }
@@ -1251,8 +1250,8 @@ ukbd_read_char(keyboard_t *kbd, int wait
 next_code:
 
 	/* do we have a composed char to return ? */
-	if ((sc->sc_composed_char > 0) &&
-	    (!(sc->sc_flags & UKBD_FLAG_COMPOSE))) {
+	if (sc->sc_composed_char > 0 &&
+	    !(sc->sc_flags & UKBD_FLAG_COMPOSE)) {
 		action = sc->sc_composed_char;
 		sc->sc_composed_char = 0;
 
@@ -1604,7 +1603,7 @@ ukbd_is_polling(struct ukbd_softc *sc)
 		return (1);	/* polling */
 
 	delta = ticks - sc->sc_poll_tick_last;
-	if ((delta < 0) || (delta >= hz)) {
+	if (delta < 0 || delta >= hz) {
 		sc->sc_poll_detected = 0;
 		return (0);		/* not polling */
 	}
@@ -1729,10 +1728,10 @@ ukbd_key2scan(struct ukbd_softc *sc, int
 		0x5c,	/* Keyboard Intl' 6 (Keypad ,) (For PC-9821 layout) */
 	};
 
-	if ((code >= 89) && (code < (89 + (sizeof(scan) / sizeof(scan[0])))))
+	if (code >= 89 && code < (89 + (sizeof(scan) / sizeof(scan[0]))))
 		code = scan[code - 89];
 	/* Pause/Break */
-	if ((code == 104) && (!(shift & (MOD_CONTROL_L | MOD_CONTROL_R))))
+	if (code == 104 && !(shift & (MOD_CONTROL_L | MOD_CONTROL_R)))
 		code = (0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL);
 	if (shift & (MOD_SHIFT_L | MOD_SHIFT_R))
 		code &= ~SCAN_PREFIX_SHIFT;

Modified: user/weongyo/usb/sys/dev/usb/input/ums.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/input/ums.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/input/ums.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -229,26 +229,26 @@ ums_intr_callback(struct usb_xfer *xfer,
 		} else {
 			id = 0;
 			if (sc->sc_info[0].sc_flags & UMS_FLAG_SBU) {
-				if ((*buf == 0x14) || (*buf == 0x15))
+				if (*buf == 0x14 || *buf == 0x15)
 					goto tr_setup;
 			}
 		}
 
 	repeat:
-		if ((info->sc_flags & UMS_FLAG_W_AXIS) &&
-		    (id == info->sc_iid_w))
+		if (info->sc_flags & UMS_FLAG_W_AXIS &&
+		    id == info->sc_iid_w)
 			dw += hid_get_data(buf, len, &info->sc_loc_w);
 
-		if ((info->sc_flags & UMS_FLAG_X_AXIS) && 
-		    (id == info->sc_iid_x))
+		if (info->sc_flags & UMS_FLAG_X_AXIS && 
+		    id == info->sc_iid_x)
 			dx += hid_get_data(buf, len, &info->sc_loc_x);
 
-		if ((info->sc_flags & UMS_FLAG_Y_AXIS) &&
-		    (id == info->sc_iid_y))
+		if (info->sc_flags & UMS_FLAG_Y_AXIS &&
+		    id == info->sc_iid_y)
 			dy = -hid_get_data(buf, len, &info->sc_loc_y);
 
-		if ((info->sc_flags & UMS_FLAG_Z_AXIS) &&
-		    (id == info->sc_iid_z)) {
+		if (info->sc_flags & UMS_FLAG_Z_AXIS &&
+		    id == info->sc_iid_z) {
 			int32_t temp;
 			temp = hid_get_data(buf, len, &info->sc_loc_z);
 			if (info->sc_flags & UMS_FLAG_REVZ)
@@ -256,8 +256,8 @@ ums_intr_callback(struct usb_xfer *xfer,
 			dz -= temp;
 		}
 
-		if ((info->sc_flags & UMS_FLAG_T_AXIS) &&
-		    (id == info->sc_iid_t))
+		if (info->sc_flags & UMS_FLAG_T_AXIS &&
+		    id == info->sc_iid_t)
 			dt -= hid_get_data(buf, len, &info->sc_loc_t);
 
 		for (i = 0; i < info->sc_buttons; i++) {
@@ -367,8 +367,8 @@ ums_probe(device_t dev)
 	if (uaa->info.bInterfaceClass != UICLASS_HID)
 		return (ENXIO);
 
-	if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) &&
-	    (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))
+	if (uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT &&
+	    uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)
 		return (BUS_PROBE_GENERIC);
 
 	error = usbd_req_get_hid_desc(uaa->device, NULL,
@@ -684,7 +684,7 @@ ums_start_read(struct usb_fifo *fifo)
 	if (rate > 1000)
 		rate = 1000;
 	/* Check for set rate */
-	if ((rate > 0) && (sc->sc_xfer[UMS_INTR_DT] != NULL)) {
+	if (rate > 0 && sc->sc_xfer[UMS_INTR_DT] != NULL) {
 		DPRINTF("Setting pollrate = %d\n", rate);
 		/* Stop current transfer, if any */
 		usbd_transfer_stop(sc->sc_xfer[UMS_INTR_DT]);
@@ -816,7 +816,7 @@ ums_ioctl(struct usb_fifo *fifo, u_long 
 
 		if (mode.level == -1)
 			;	/* don't change the current setting */
-		else if ((mode.level < 0) || (mode.level > 1)) {
+		else if (mode.level < 0 || mode.level > 1) {
 			error = EINVAL;
 			goto done;
 		} else

Modified: user/weongyo/usb/sys/dev/usb/misc/udbp.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/misc/udbp.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/misc/udbp.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -300,21 +300,21 @@ udbp_probe(device_t dev)
 	 * compare the revision id in the device descriptor with 0x101 Or go
 	 * search the file usbdevs.h. Maybe the device is already in there.
 	 */
-	if (((uaa->info.idVendor == USB_VENDOR_NETCHIP) &&
-	    (uaa->info.idProduct == USB_PRODUCT_NETCHIP_TURBOCONNECT)))
+	if (uaa->info.idVendor == USB_VENDOR_NETCHIP &&
+	    uaa->info.idProduct == USB_PRODUCT_NETCHIP_TURBOCONNECT)
 		return (0);
 
-	if (((uaa->info.idVendor == USB_VENDOR_PROLIFIC) &&
-	    ((uaa->info.idProduct == USB_PRODUCT_PROLIFIC_PL2301) ||
-	    (uaa->info.idProduct == USB_PRODUCT_PROLIFIC_PL2302))))
+	if (uaa->info.idVendor == USB_VENDOR_PROLIFIC &&
+	    (uaa->info.idProduct == USB_PRODUCT_PROLIFIC_PL2301 ||
+	     uaa->info.idProduct == USB_PRODUCT_PROLIFIC_PL2302))
 		return (0);
 
-	if ((uaa->info.idVendor == USB_VENDOR_ANCHOR) &&
-	    (uaa->info.idProduct == USB_PRODUCT_ANCHOR_EZLINK))
+	if (uaa->info.idVendor == USB_VENDOR_ANCHOR &&
+	    uaa->info.idProduct == USB_PRODUCT_ANCHOR_EZLINK)
 		return (0);
 
-	if ((uaa->info.idVendor == USB_VENDOR_GENESYS) &&
-	    (uaa->info.idProduct == USB_PRODUCT_GENESYS_GL620USB))
+	if (uaa->info.idVendor == USB_VENDOR_GENESYS &&
+	    uaa->info.idProduct == USB_PRODUCT_GENESYS_GL620USB)
 		return (0);
 
 	return (ENXIO);
@@ -479,8 +479,7 @@ udbp_bulk_read_complete(node_p node, hoo
 	if (m) {
 		sc->sc_bulk_in_buffer = NULL;
 
-		if ((sc->sc_hook == NULL) ||
-		    NG_HOOK_NOT_VALID(sc->sc_hook)) {
+		if (sc->sc_hook == NULL || NG_HOOK_NOT_VALID(sc->sc_hook)) {
 			DPRINTF("No upstream hook\n");
 			goto done;
 		}
@@ -832,8 +831,8 @@ ng_udbp_disconnect(hook_p hook)
 
 		mtx_unlock(&sc->sc_mtx);
 	}
-	if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
-	    && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))))
+	if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 &&
+	    NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))
 		ng_rmnode_self(NG_HOOK_NODE(hook));
 
 	return (error);

Modified: user/weongyo/usb/sys/dev/usb/misc/ufm.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/misc/ufm.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/misc/ufm.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -126,8 +126,8 @@ ufm_probe(device_t dev)
 
 	if (uaa->usb_mode != USB_MODE_HOST)
 		return (ENXIO);
-	if ((uaa->info.idVendor == USB_VENDOR_CYPRESS) &&
-	    (uaa->info.idProduct == USB_PRODUCT_CYPRESS_FMRADIO))
+	if (uaa->info.idVendor == USB_VENDOR_CYPRESS &&
+	    uaa->info.idProduct == USB_PRODUCT_CYPRESS_FMRADIO)
 		return (0);
 	return (ENXIO);
 }

Modified: user/weongyo/usb/sys/dev/usb/net/if_cdce.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/net/if_cdce.c	Sun Oct  3 22:24:14 2010	(r213391)
+++ user/weongyo/usb/sys/dev/usb/net/if_cdce.c	Sun Oct  3 23:40:54 2010	(r213392)
@@ -451,7 +451,7 @@ cdce_attach(device_t dev)
 	    (uaa->device, NULL, uaa->info.bIfaceIndex,
 	    UDESC_CS_INTERFACE, 0 - 1, UDESCSUB_CDC_UNION, 0 - 1);
 
-	if ((ud == NULL) || (ud->bLength < sizeof(*ud)) ||
+	if (ud == NULL || ud->bLength < sizeof(*ud) ||
 	    (sc->sc_flags & CDCE_FLAG_NO_UNION)) {
 		DPRINTFN(1, "No union descriptor!\n");
 		sc->sc_ifaces_index[0] = uaa->info.bIfaceIndex;
@@ -512,7 +512,7 @@ alloc_transfers:
 		if (error)
 			break;
 #if CDCE_HAVE_NCM
-		if ((i == 0) && (cdce_ncm_init(sc) == 0))
+		if (i == 0 && cdce_ncm_init(sc) == 0)
 			pcfg = cdce_ncm_config;
 #endif
 		error = usbd_transfer_setup(uaa->device,
@@ -533,7 +533,7 @@ alloc_transfers:
 	    (uaa->device, NULL, uaa->info.bIfaceIndex,
 	    UDESC_CS_INTERFACE, 0 - 1, UDESCSUB_CDC_ENF, 0 - 1);
 
-	if ((ued == NULL) || (ued->bLength < sizeof(*ued)))
+	if (ued == NULL || ued->bLength < sizeof(*ued))
 		error = USB_ERR_INVAL;
 	else {
 		error = usbd_req_get_string_any(uaa->device, NULL, 
@@ -1151,10 +1151,10 @@ cdce_ncm_bulk_read_callback(struct usb_x
 		usbd_copy_out(pc, 0, &(sc->sc_ncm.hdr),
 		    sizeof(sc->sc_ncm.hdr));
 
-		if ((sc->sc_ncm.hdr.dwSignature[0] != 'N') ||
-		    (sc->sc_ncm.hdr.dwSignature[1] != 'C') ||
-		    (sc->sc_ncm.hdr.dwSignature[2] != 'M') ||
-		    (sc->sc_ncm.hdr.dwSignature[3] != 'H')) {
+		if (sc->sc_ncm.hdr.dwSignature[0] != 'N' ||
+		    sc->sc_ncm.hdr.dwSignature[1] != 'C' ||
+		    sc->sc_ncm.hdr.dwSignature[2] != 'M' ||
+		    sc->sc_ncm.hdr.dwSignature[3] != 'H') {
 			DPRINTFN(1, "invalid HDR signature: "
 			    "0x%02x:0x%02x:0x%02x:0x%02x\n",

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list