summaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorNick Wilson <njw@osdl.org>2005-06-25 23:59:00 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-26 01:25:02 +0200
commit8c0e33c133021ee241e9d51255b9fb18eb34ef0e (patch)
tree30ddff7f7cf375c36d11d49352365a42b25e1def /kernel/resource.c
parent[PATCH] x86_64: coding style and whitespace fixups (diff)
downloadlinux-8c0e33c133021ee241e9d51255b9fb18eb34ef0e.tar.xz
linux-8c0e33c133021ee241e9d51255b9fb18eb34ef0e.zip
[PATCH] Use ALIGN to remove duplicate code
This patch makes use of ALIGN() to remove duplicate round-up code. Signed-off-by: Nick Wilson <njw@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 52f696f11adf..26967e042201 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -263,7 +263,7 @@ static int find_resource(struct resource *root, struct resource *new,
new->start = min;
if (new->end > max)
new->end = max;
- new->start = (new->start + align - 1) & ~(align - 1);
+ new->start = ALIGN(new->start, align);
if (alignf)
alignf(alignf_data, new, size, align);
if (new->start < new->end && new->end - new->start >= size - 1) {