[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/dts: Use ROUNDUP macro instead of the internal ALIGN
commit 14c616eca8630f11b24969e06cacfc945ebf3b12 Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Fri Sep 27 17:56:35 2013 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Tue Oct 8 15:46:07 2013 +0100 xen/dts: Use ROUNDUP macro instead of the internal ALIGN Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/common/device_tree.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 27ee708..ea8ed56 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -65,8 +65,6 @@ static LIST_HEAD(aliases_lookup); printk(fmt, ## __VA_ARGS__); \ } while (0) -#define ALIGN(x, a) ((x + (a) - 1) & ~((a) - 1)); - // #define DEBUG_DT #ifdef DEBUG_DT @@ -457,7 +455,7 @@ static void __init *unflatten_dt_alloc(unsigned long *mem, unsigned long size, { void *res; - *mem = ALIGN(*mem, align); + *mem = ROUNDUP(*mem, align); res = (void *)*mem; *mem += size; @@ -1442,7 +1440,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt, *p += 4; pathp = (char *)*p; l = allocl = strlen(pathp) + 1; - *p = ALIGN(*p + l, 4); + *p = ROUNDUP(*p + l, 4); /* version 0x10 has a more compact unit name here instead of the full * path. we accumulate the full path size using "fpsize", we'll rebuild @@ -1535,7 +1533,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt, noff = be32_to_cpup((__be32 *)((*p) + 4)); *p += 8; if ( fdt_version(fdt) < 0x10 ) - *p = ALIGN(*p, sz >= 8 ? 8 : 4); + *p = ROUNDUP(*p, sz >= 8 ? 8 : 4); pname = fdt_string(fdt, noff); if ( pname == NULL ) @@ -1572,7 +1570,7 @@ static unsigned long __init unflatten_dt_node(const void *fdt, *prev_pp = pp; prev_pp = &pp->next; } - *p = ALIGN((*p) + sz, 4); + *p = ROUNDUP((*p) + sz, 4); } /* with version 0x10 we may not have the name property, recreate * it here from the unit name if absent -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |