In article <20150823111508.9f09...@cvs.netbsd.org>,
Nick Hudson <source-changes-d@NetBSD.org> wrote:
>-=-=-=-=-=-
>
>+      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)) {
>+                      usb_syncmem(&xfer->dmabuf, 0, xfer->actlen,
>+                          rd ? BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
>+              }
>+      }
>+

Why initialize rd so early, before it is needed?

christos

Reply via email to