svn commit: r212944 - user/weongyo/usb/sys/dev/usb

Weongyo Jeong weongyo at FreeBSD.org
Tue Sep 21 00:27:50 UTC 2010


Author: weongyo
Date: Tue Sep 21 00:27:50 2010
New Revision: 212944
URL: http://svn.freebsd.org/changeset/base/212944

Log:
  Uses roundup() macro instead of inventing the wheel again.

Modified:
  user/weongyo/usb/sys/dev/usb/usb_transfer.c

Modified: user/weongyo/usb/sys/dev/usb/usb_transfer.c
==============================================================================
--- user/weongyo/usb/sys/dev/usb/usb_transfer.c	Tue Sep 21 00:14:00 2010	(r212943)
+++ user/weongyo/usb/sys/dev/usb/usb_transfer.c	Tue Sep 21 00:27:50 2010	(r212944)
@@ -214,7 +214,7 @@ usbd_transfer_setup_sub_malloc(struct us
 	/*
 	 * Make sure that the size is aligned properly.
 	 */
-	size = -((-size) & (-align));
+	size = roundup(size, align);
 
 	/*
 	 * Try multi-allocation chunks to reduce the number of DMA


More information about the svn-src-user mailing list