Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/dwc2 Move rd assignment. Spotted by christo...



details:   https://anonhg.NetBSD.org/src/rev/0ac0d7ccde71
branches:  trunk
changeset: 340114:0ac0d7ccde71
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Aug 23 13:18:44 2015 +0000

description:
Move rd assignment. Spotted by christos@. Thanks.

diffstat:

 sys/external/bsd/dwc2/dwc2.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r c0978af9ea2a -r 0ac0d7ccde71 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c      Sun Aug 23 11:15:08 2015 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c      Sun Aug 23 13:18:44 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dwc2.c,v 1.34 2015/08/23 11:15:08 skrll Exp $  */
+/*     $NetBSD: dwc2.c,v 1.35 2015/08/23 13:18:44 skrll Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.34 2015/08/23 11:15:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.35 2015/08/23 13:18:44 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -1755,14 +1755,14 @@
        }
 
        if (xfer->status == USBD_NORMAL_COMPLETION) {
-               int rd = usbd_xfer_isread(xfer);
-
                /*
                 * control transfers with no data phase don't touch dmabuf, but
                 * everything else does.
                 */
                if (!(xfertype == UE_CONTROL &&
                    UGETW(xfer->request.wLength) == 0)) {
+                       int rd = usbd_xfer_isread(xfer);
+
                        usb_syncmem(&xfer->dmabuf, 0, xfer->actlen,
                            rd ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
                }



Home | Main Index | Thread Index | Old Index