svn commit: r212913 - user/weongyo/usb/sys/dev/usb
Weongyo Jeong
weongyo at FreeBSD.org
Mon Sep 20 18:49:29 UTC 2010
Author: weongyo
Date: Mon Sep 20 18:49:28 2010
New Revision: 212913
URL: http://svn.freebsd.org/changeset/base/212913
Log:
Don't check `align' value 0 whenever it multiplies alignment value and
2 that it looks it's meaningless.
Modified:
user/weongyo/usb/sys/dev/usb/usb_busdma.c
Modified: user/weongyo/usb/sys/dev/usb/usb_busdma.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_busdma.c Mon Sep 20 18:41:15 2010 (r212912)
+++ user/weongyo/usb/sys/dev/usb/usb_busdma.c Mon Sep 20 18:49:28 2010 (r212913)
@@ -490,18 +490,16 @@ usb_pc_alloc_mem(struct usb_page_cache *
uptag = pc->tag_parent;
+ if (align == 0)
+ goto error;
if (align != 1) {
/*
* The alignment must be greater or equal to the
* "size" else the object can be split between two
* memory pages and we get a problem!
*/
- while (align < size) {
+ while (align < size)
align *= 2;
- if (align == 0) {
- goto error;
- }
- }
#if 1
/*
* XXX BUS-DMA workaround - FIXME later:
More information about the svn-src-user
mailing list