Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2010 00:27:50 +0000 (UTC)
From:      Weongyo Jeong <weongyo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r212944 - user/weongyo/usb/sys/dev/usb
Message-ID:  <201009210027.o8L0Rolv072945@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009210027.o8L0Rolv072945>