[PATCH] Define/use ALIGN() instead of open coding it

Keith Packard keithp at keithp.com
Thu Apr 8 16:37:20 PDT 2010


On Thu,  8 Apr 2010 19:10:52 -0400, Matt Turner <mattst88 at gmail.com> wrote:

> -#define GET_HIGH_BASE(x) (((V_BIOS + (x) + getpagesize() - 1)/getpagesize()) \
> -                              * getpagesize())
> +#define GET_HIGH_BASE(x) (ALIGN(V_BIOS + (x), getpagesize()))
>  #endif

Note that this assumes getpagesize will return a power of two.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100408/f04b256e/attachment.pgp>


More information about the xorg-devel mailing list