Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Simplify an expression using the OHCI_PAGE_OFFSE...



details:   https://anonhg.NetBSD.org/src/rev/9707c836d03b
branches:  trunk
changeset: 351018:9707c836d03b
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jan 30 21:35:59 2017 +0000

description:
Simplify an expression using the OHCI_PAGE_OFFSET macro

diffstat:

 sys/dev/usb/ohci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r b26ceb2d3c9f -r 9707c836d03b sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Mon Jan 30 21:34:20 2017 +0000
+++ b/sys/dev/usb/ohci.c        Mon Jan 30 21:35:59 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci.c,v 1.268 2017/01/30 21:34:20 skrll Exp $ */
+/*     $NetBSD: ohci.c,v 1.269 2017/01/30 21:35:59 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.268 2017/01/30 21:34:20 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.269 2017/01/30 21:35:59 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -636,7 +636,7 @@
                    sphyspg + OHCI_PAGE_SIZE != ephyspg) {
                        /* must use multiple TDs, fill as much as possible. */
                        curlen = 2 * OHCI_PAGE_SIZE -
-                           (sdataphys & (OHCI_PAGE_SIZE - 1));
+                           OHCI_PAGE_OFFSET(sdataphys);
                        /* the length must be a multiple of the max size */
                        curlen -= curlen % mps;
                }



Home | Main Index | Thread Index | Old Index