Module Name:    src
Committed By:   skrll
Date:           Thu Nov 14 12:41:46 UTC 2013

Modified Files:
        src/sys/external/bsd/dwc2/dist: dwc2_hcd.c

Log Message:
Simplify variable assignment and avoid gcc warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/dwc2/dist/dwc2_hcd.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/external/bsd/dwc2/dist/dwc2_hcd.c
diff -u src/sys/external/bsd/dwc2/dist/dwc2_hcd.c:1.7 src/sys/external/bsd/dwc2/dist/dwc2_hcd.c:1.8
--- src/sys/external/bsd/dwc2/dist/dwc2_hcd.c:1.7	Tue Oct 22 16:37:08 2013
+++ src/sys/external/bsd/dwc2/dist/dwc2_hcd.c	Thu Nov 14 12:41:46 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2_hcd.c,v 1.7 2013/10/22 16:37:08 skrll Exp $	*/
+/*	$NetBSD: dwc2_hcd.c,v 1.8 2013/11/14 12:41:46 skrll Exp $	*/
 
 /*
  * hcd.c - DesignWare HS OTG Controller host-mode routines
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.7 2013/10/22 16:37:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2_hcd.c,v 1.8 2013/11/14 12:41:46 skrll Exp $");
 
 #include <sys/types.h>
 #include <sys/kmem.h>
@@ -571,7 +571,7 @@ static void *dwc2_hc_init_xfer(struct dw
 			       struct dwc2_qtd *qtd, struct dwc2_hcd_urb *urb)
 {
 	struct dwc2_hcd_iso_packet_desc *frame_desc;
-	void *bufptr;
+	void *bufptr = NULL;
 
 	switch (dwc2_hcd_get_pipe_type(&urb->pipe_info)) {
 	case USB_ENDPOINT_XFER_CONTROL:
@@ -588,7 +588,6 @@ static void *dwc2_hc_init_xfer(struct dw
 			else
 				chan->xfer_buf = urb->setup_packet;
 			chan->xfer_len = 8;
-			bufptr = NULL;
 			break;
 
 		case DWC2_CONTROL_DATA:
@@ -616,7 +615,6 @@ static void *dwc2_hc_init_xfer(struct dw
 				chan->xfer_dma = hsotg->status_buf_dma;
 			else
 				chan->xfer_buf = hsotg->status_buf;
-			bufptr = NULL;
 			break;
 		}
 		break;
@@ -656,8 +654,6 @@ static void *dwc2_hc_init_xfer(struct dw
 		    (chan->xfer_dma & 0x3))
 			bufptr = (u8 *)urb->buf + frame_desc->offset +
 					qtd->isoc_split_offset;
-		else
-			bufptr = NULL;
 
 		if (chan->xact_pos == DWC2_HCSPLT_XACTPOS_ALL) {
 			if (chan->xfer_len <= 188)

Reply via email to