Module Name:    src
Committed By:   skrll
Date:           Fri Apr  1 12:58:15 UTC 2016

Modified Files:
        src/sys/dev/usb [nick-nhusb]: ohci.c

Log Message:
constify tdflags in ohci_{alloc,reset}_std_chain


To generate a diff of this commit:
cvs rdiff -u -r1.254.2.60 -r1.254.2.61 src/sys/dev/usb/ohci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.60 src/sys/dev/usb/ohci.c:1.254.2.61
--- src/sys/dev/usb/ohci.c:1.254.2.60	Thu Mar 24 15:30:17 2016
+++ src/sys/dev/usb/ohci.c	Fri Apr  1 12:58:15 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.60 2016/03/24 15:30:17 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.61 2016/04/01 12:58:15 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.60 2016/03/24 15:30:17 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.61 2016/04/01 12:58:15 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -523,7 +523,6 @@ ohci_alloc_std_chain(ohci_softc_t *sc, s
 	struct usbd_pipe *pipe = xfer->ux_pipe;
 	ohci_soft_td_t *next, *cur;
 	ohci_physaddr_t dataphys, dataphysend;
-	uint32_t tdflags;
 	int len = alen;
 	int curlen;
 	usb_dma_t *dma = &xfer->ux_dmabuf;
@@ -554,7 +553,7 @@ ohci_alloc_std_chain(ohci_softc_t *sc, s
 
 	dataphys = DMAADDR(dma, 0);
 	dataphysend = OHCI_PAGE(dataphys + len - 1);
-	tdflags = HTOO32(
+	const uint32_t tdflags = HTOO32(
 	    (rd ? OHCI_TD_IN : OHCI_TD_OUT) |
 	    OHCI_TD_NOCC | OHCI_TD_TOGGLE_CARRY | OHCI_TD_NOINTR);
 
@@ -650,7 +649,6 @@ ohci_reset_std_chain(ohci_softc_t *sc, s
 	struct ohci_xfer *ox = OHCI_XFER2OXFER(xfer);
 	ohci_soft_td_t *next, *cur;
 	ohci_physaddr_t dataphys, dataphysend;
-	uint32_t tdflags;
 	int len, curlen;
 	usb_dma_t *dma = &xfer->ux_dmabuf;
 	uint16_t flags = xfer->ux_flags;
@@ -676,7 +674,7 @@ ohci_reset_std_chain(ohci_softc_t *sc, s
 	dataphysend = OHCI_PAGE(dataphys + len - 1);
 	usb_syncmem(dma, 0, len,
 	    rd ? BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);
-	tdflags = HTOO32(
+	const uint32_t tdflags = HTOO32(
 	    (rd ? OHCI_TD_IN : OHCI_TD_OUT) |
 	    OHCI_TD_NOCC | OHCI_TD_TOGGLE_CARRY | OHCI_TD_NOINTR);
 

Reply via email to